List of utility methods to do Array to List
List | toList(@SuppressWarnings("unchecked") T... ts) to List return Arrays.asList(ts);
|
List | toList(boolean... booleans) to List List<Boolean> list = new ArrayList<>(); for (boolean b : booleans) { list.add(b); return list; |
List | toList(boolean[] array) to List if ((array == null) || (array.length == 0)) { return new ArrayList<Boolean>(); List<Boolean> list = new ArrayList<Boolean>(array.length); for (boolean value : array) { list.add(value); return list; ... |
List | toList(boolean[] array) to List if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; List<Boolean> list = new ArrayList<Boolean>(array.length); for (boolean value : array) { list.add(value); return list; ... |
List | toList(Boolean[] list) to List if ((list == null) || (list.length == 0)) { return Collections.EMPTY_LIST; List<Boolean> newList = new ArrayList<Boolean>(list.length); for (Boolean value : list) { newList.add(value); return newList; ... |
List | toList(byte[] array) Turns the byte array into a Byte list. ArrayList<Byte> result; result = new ArrayList<>(); for (byte element : array) result.add(element); return result; |
List | toList(byte[] array) to List if (array == null) { return null; List<Byte> list = new ArrayList<Byte>(array.length); for (byte value : array) { list.add(value); return list; ... |
List | toList(double[] array) Converts from a double array to a list. List<Double> list = new ArrayList<Double>(); for (int i = 0; i < array.length; i++) list.add(array[i]); return list; |
ArrayList | toList(double[] array) to List ArrayList<Double> result = new ArrayList<Double>(); for (double d : array) { result.add(d); return result; |
List | toList(E... e) to List return Arrays.asList(e);
|