List of utility methods to do Array to List
ArrayList | toList(String[] array) Creates a new ArrayList collection from the specified array of Strings. if (array == null) { return new ArrayList<String>(0); ArrayList<String> list = new ArrayList<String>(array.length); for (String s : array) { list.add(s); return list; ... |
List | toList(String[] array) to List return let(array, null);
|
List | toList(T element, T... elements) to List List<T> allElements = new ArrayList<T>(); if (element != null) { allElements.add(element); if (elements != null) { Collections.addAll(allElements, elements); return allElements; ... |
List | toList(T value) Returns a modifiable list containing just the specified element. ArrayList<T> newList = new ArrayList<>(); newList.add(value); return newList; |
List | toList(T... elements) to List List<T> list = Collections.emptyList(); if (elements != null) { list = new ArrayList<T>(elements.length); Collections.addAll(list, elements); return list; |
List | toList(T... items) Converts the supplied array into a List. if (items == null) return null; List<T> list = new ArrayList<T>(items.length); for (T item : items) list.add(item); return list; |
List | toList(T... objects) return a list of objects from varargs. if (objects == null) { return null; if (objects.length == 1 && objects[0] instanceof List) { return (List<T>) objects[0]; List<T> result = new ArrayList<T>(); for (T object : objects) { ... |
List | toList(T... objects) Converts the given objects into a List . if (objects != null) { List<T> result = new ArrayList<T>(objects.length); for (T obj : objects) { result.add(obj); return result; } else { return new ArrayList<T>(0); ... |
List | toList(T[] _array) Generische Methode zum Umwandeln von Array in Listen List<T> r = new ArrayList<T>(); for (int i = 0, m = _array.length; i < m; i++) { r.add(_array[i]); return r; |
List | toList(T[] anArrayToConvert) Returns a list equivalent to the array given as input. ArrayList<T> aListToEnrich = new ArrayList<T>(); enrichList(aListToEnrich, anArrayToConvert); return aListToEnrich; |