Package java.util

Examples of java.util.ArrayList.toArray()


      if ( all )
        this.collectParts( result, tokenizer, delimiters ) ;
      else
        this.collectParts( result, tokenizer ) ;
    }
    return (String[])result.toArray( new String[0] ) ;
  } // parts()

  // -------------------------------------------------------------------------

  protected void collectParts( List list, StringTokenizer tokenizer )
View Full Code Here


      }
 
      if ( start < strLen )
        strings.add( str.substring( start ) ) ;
    }
    return (String[])strings.toArray( new String[0] ) ;
  } // substrings()

  // -------------------------------------------------------------------------

  protected String padCh( String str, int len, char ch, boolean left )
View Full Code Here

                if (resource.exists() && resource.getShortName().equals(resourceName))
                    a.add(Context.toObject(resource, core.global));
            }
            prototype =  prototype.getParentPrototype();
        }
        return Context.getCurrentContext().newArray(core.global, a.toArray());
    }

}
View Full Code Here

    public static String[] collect(Enumeration en) {
        List list = new ArrayList();
        while (en.hasMoreElements()) {
            list.add(en.nextElement());
        }
        return (String[]) list.toArray(new String[list.size()]);
    }

    /**
     * Get the largest common prefix of Strings s1 and s2
     * @param s1 a string
View Full Code Here

    if (this.relatedTo == null) {return null;}
    ArrayList l = new ArrayList();
    for (int i=0; i<this.relatedTo.length; i++) {
      l.add(PluginCoreUtils.convert(this.relatedTo[i], false));
    }
    return l.toArray();
  }
 
  public int getTimeoutSecs() {
    if (this.timeoutSecs != -1) {return this.timeoutSecs;}
    return COConfigurationManager.getIntParameter("Message Popup Autoclose in Seconds");
View Full Code Here

      for (int i = 0; i < parameters.length; i++) {
        Object param = parameters[i];
        typeList.add(param.getClass());
      }
      if (typeList.size() > 0) {
        result = (Class[]) typeList.toArray(new Class[typeList.size()]);
      }
    }
    return result;
  }
View Full Code Here

      Rectangle intersect= widgetBounds.intersection(rectangle);
      if (intersect != null && intersect.height == rectangle.height) {
        result.add(new Point(intersect.x, intersect.y + intersect.height));
      }
    }
    return (Point[]) result.toArray(new Point[result.size()]);
  }
 
  private Point findBestLocation(Point[] points, Point relativeCursor) {
    Point result= null;
    double bestDist= Double.MAX_VALUE;
View Full Code Here

    public static Object[] createList(int start, int end) {
        List<Integer> list = new ArrayList();
        for (int i = start; i < end; i++) {
            list.add(i);
        }
        return list.toArray();
    }

    @Override
    public String getProperty() {
        return super.getProperty();
View Full Code Here

                    }
                }
                lastc = c;
            }
            l.add(val.substring(s, e));
            return (String[])l.toArray(new String[0]);
        }
    }
   
    // Replace junk in publicids with spaces
    private static String legal =
View Full Code Here

      while (e.hasMoreElements()) {
        Principal p = (Principal) e.nextElement();
        principalRoles.add(p.getName());
      }
    }
    return principalRoles.toArray();
  }


  /**
   * @return
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.