List of utility methods to do Array to ArrayList Convert
ArrayList | arrayAsList(final E[] array, final int start, final int end) array As List if (array == null) { throw new NullPointerException(); if (start < 0 || start > end || end > array.length) { throw new IllegalArgumentException(); final ArrayList<E> list = new ArrayList<>(end - start); for (int i = start; i < end; i++) { ... |
Collection | sequence(final int from, final int count) sequence final Integer[] arr = new Integer[count]; for (int i = 0; i < count; i++) { arr[i] = Integer.valueOf(from + i); return Arrays.asList(arr); |