List of utility methods to do Array to List
java.util.List | toList(T[] arr) to List java.util.List<T> rel = null; if (arr != null && arr.length > 0) { rel = new java.util.ArrayList<T>(); for (T item : arr) { rel.add(item); return rel; ... |
List | toList(T[] array) Converts an array to a List . final List<T> result = new ArrayList<T>(array.length); for (final T element : array) { result.add(element); return result; |
List | toList(T[] array) to List List<T> result = new ArrayList<>(array.length); for (T o : array) { result.add(o); return result; |
List | toList(T[] array) to List ArrayList<T> toRet = new ArrayList<T>(); Collections.addAll(toRet, array); return toRet; |
List | toList(T[] array) to List return Arrays.asList(array);
|
List | toList(T[] array) to List List<T> list = new ArrayList<>(); Collections.addAll(list, array); return list; |
List | toList(U... array) Converts an array into a list. List<T> result = new ArrayList<T>(array.length); for (T item : array) result.add(item); return result; |
List | toList(V... elements) to List return toList(new ArrayList<V>(), elements); |
List | toList(Value... values) Create a list List<Value> list = new ArrayList<>(); if (values != null && values.length > 0) { for (Value value : values) { list.add(value); return list; |