List of utility methods to do Collection Create
Set | create(Collection Creates a set containing all the elements in the collection return new HashSet<T>(coll); |
String | createAuthorString(Collection users) create Author String Collection<String> alreadySeen = new ArrayList<String>(); String authorLabel = ""; Iterator c = users.iterator(); boolean firstAuthor = true; while (c.hasNext()) { String nextAuthor = (String) c.next(); if (nextAuthor == null) continue; ... |
Collection | createCollection(final Iterable create Collection final Collection<T> collection = new ArrayList<T>(); for (final T item : object) { collection.add(item); return collection; |
Collection | createCollection(Collection col) Create and answer a collection that is the same type, or the closest equivalent of col. Collection answer; try { answer = (Collection) col.getClass().newInstance(); } catch (Exception e) { if (col instanceof List) { answer = new ArrayList(); } else if (col instanceof SortedSet) { answer = new TreeSet(); ... |
Collection | createCollection(Object[] objects) create Collection Collection result = createCollection(); for (int i = 0; i < objects.length; i++) { result.add(objects[i]); return result; |
Collection | createCollection(T... items) create Collection Collection<T> collection = new ArrayList<T>(items.length); for (T item : items) { collection.add(item); return collection; |
Collection | createCollection(X o) create Collection return createList(o);
|
Collection | createCollectionFromString(String value) create Collection From String if (value == null) { return null; final StringTokenizer t = new StringTokenizer(value, COLLECTION_SEPARATOR); final List result = new ArrayList(); while (t.hasMoreTokens()) { result.add(t.nextToken()); return result; |
String | createCSV(Collection list) create CSV return createCSV(list, null);
|
String | createCsvString(Collection Create string with comma separated list of values from input collection. if (in == null) return null; if (in.isEmpty()) { return ""; boolean first = true; StringBuilder sb = new StringBuilder(); for (String s : in) { ... |