List of utility methods to do List Copy
float[] | copyToArray(List Copies the contents from an array list to an array. for (int i = 0; i < list.size(); i++) { array[i] = list.get(i); return array; |
List | copyToArrayListWithExtraCapacity(T[] elements, int extraCapacity) Produces an ArrayList for an array of elements where the list is pre-sized with extra capacity. List<T> asList; if (elements != null) { asList = new ArrayList<T>(elements.length + extraCapacity); asList.addAll(Arrays.asList(elements)); } else { asList = new ArrayList<T>(extraCapacity); return asList; ... |
List | copyToList(Iterable extends E> elements) copy To List List<E> list = new ArrayList<E>(); addAll(list, elements); return list; |
List | copyTypes(List copy Types if (isEmpty(src)) { if (dest != null) { dest.clear(); } else { if (dest == null) { dest = new ArrayList<String>(src.size()); } else { ... |