List of utility methods to do List from Array
List | ArrayToList(String[] input) Array To List if (input == null) { return null; List<String> output = new ArrayList<String>(); for (int i = 0; i < input.length; i++) { output.add(input[i]); return output; ... |
List | arrayToList(String[] str) array To List List list = Arrays.asList(str);
return list;
|
ArrayList | arrayToList(T array[]) array To List if (null == array) { return null; return new ArrayList<T>(Arrays.asList(array)); |
List | arrayToList(T[] array) Array to List converter List<T> list = new ArrayList<T>(); if (array != null) { for (T element : array) { list.add(element); return list; |
ArrayList | arrayToList(T[] array) Converts the generic array into an ArrayList of the same type. ArrayList<T> list = new ArrayList<T>(array.length); for (T element : array) { list.add(element); return list; |
List | arrayToList(T[] array) array To List return isArrayEmpty(array) ? new ArrayList<T>(1) : Arrays.asList(array); |
ArrayList | arrayToList(T[] array) Converts the generic array into an ArrayList of the same type. ArrayList<T> list = new ArrayList<>(array.length); Collections.addAll(list, array); return list; |
List | arrayToList(T[] array) array To List List<T> list = new ArrayList<T>(); if (array == null || array.length == 0) { return list; for (T t : array) { list.add(t); return list; ... |
List | arrayToList(T[] obj, List array To List if (obj == null) return null; List<T> lists = newList; for (int i = 0; i < obj.length; i++) { lists.add(obj[i]); return lists; |
List | arrayToList(T[] source) Convert the supplied array into a List. return Arrays.asList(source);
|