List of utility methods to do Array to List
List | toList(Object[] arr) to List List<Object> ret = new ArrayList<Object>(); Collections.addAll(ret, arr); return ret; |
List | toList(Object[] array) Description of the Method return to_list(array);
|
List | toList(Object[] array) We could have used the Arraya.asList() method but that returns an *immutable* list !!!!! if (array == null) { return new ArrayList(); } else { ArrayList list = new ArrayList(); for (int i = 0; i < array.length; i++) { list.add(array[i]); return list; ... |
List | toList(Object[] array) to List List list = Collections.EMPTY_LIST; if (array != null) { list = new ArrayList(array.length); for (int i = 0; i < array.length; i++) { list.add(array[i]); return list; ... |
List | toList(Object[] array) to List ArrayList list = new ArrayList(); for (int i = 0; i < array.length; i++) { list.add(array[i]); return list; |
ArrayList | toList(Object[] array) Converts the supplied object list into an ArrayList if (array == null) { return null; final int len = array.length; ArrayList rs = new ArrayList(len); for (int i = 0; i < len; i++) { rs.add(array[i]); return rs; |
ArrayList | toList(Object[] data) Converts an array to an ArrayList
ArrayList<Object> result = new ArrayList<Object>(); result.add(Arrays.asList(data)); return result; |
List | toList(Object[] input) Converts an Object[] to a Collection. if (input == null) return null; return Arrays.asList(input); |
List | toList(String[] anArray) to List List<String> res = null;
res = Arrays.asList(anArray);
return res;
|
List | toList(String[] arr) array to list if (null == arr) { return null; List<String> list = new ArrayList<String>(); for (int i = 0; i < arr.length; i++) { list.add(arr[i]); return list; ... |