List of utility methods to do List from Array
List | asList(T... array) as List return Arrays.asList(array);
|
List | asList(T... array) as List return new ArrayList<T>(Arrays.asList(array)); |
List | asList(T... array) as List List<T> l = new ArrayList<T>(); for (T t : array) l.add(t); return l; |
Collection | asList(T... data) as List Collection<T> result = new ArrayList<T>(); if (data != null) { for (T obj : data) { result.add(obj); return result; |
List | asList(T... elements) as List ArrayList<T> result = new ArrayList<>(elements.length); Collections.addAll(result, elements); return result; |
List | asList(T... items) Maakt een nieuwe lijst die alle items bevat. int length = 0; if (items != null) length = items.length; ArrayList<T> list = new ArrayList<T>(length); if (items != null) { for (T item : items) list.add(item); return list; |
List | asList(T... values) Create a List containing all the given values. return Arrays.asList(values);
|
List | asList(T... values) Collects the passed in objects into a List. if (values == null) { return new ArrayList<T>(0); } else { return new ArrayList<T>(Arrays.asList(values)); |
List | asList(T... values) as List return isEmpty(values) ? Collections.emptyList() : Arrays.asList(values);
|
List | asList(T[] a) Array to List. if (a == null) return Collections.emptyList(); return Arrays.asList(a); |