List of utility methods to do List from
ArrayList | listOfOne() Create an array list of the given type of size 1. return new ArrayList<T>(1); |
List | listOfOne(T x) Answer a list containing the single object x .
List<T> result = new ArrayList<T>(); result.add(x); return result; |
List | listOfStrings(int size, String prefix) list Of Strings ArrayList<String> list = new ArrayList<String>(size); for (int i = 1; i <= size; i++) list.add(prefix + i); return list; |
String | listOfStrToString(List list Of Str To String StringBuilder sb = new StringBuilder(); for (String s : src) sb.append(s + del); src.clear(); src = null; return sb.toString(); |