List of utility methods to do ArrayList Create
ArrayList | asArrayList(Collection as Array List if (ArrayList.class.isInstance(list)) { return (ArrayList<E>) list; } else { return new ArrayList<E>(list); |
List | asArrayList(Collection If input collection is ArrayList then return it. if (collection instanceof ArrayList) { return (List<T>) collection; return new ArrayList<T>(collection); |
ArrayList | createArrayList() create Array List return new ArrayList<E>(); |
ArrayList | createArrayList() create Array List return new ArrayList<T>(); |
List | createArrayList(Collection extends T> arg) create Array List return new ArrayList<T>(arg); |
ArrayList | createArrayList(E... array) create Array List ArrayList<E> newCollection = new ArrayList<E>(); if (array != null) { Collections.addAll(newCollection, array); return newCollection; |
ArrayList | createArrayList(final DataType first, final DataType second) Creates a new ArrayList from the given pair of values. final ArrayList<DataType> result = new ArrayList<DataType>(2); result.add(first); result.add(second); return result; |
ArrayList | createArrayList(Iterable create Array List ArrayList<T> al = new ArrayList<>(size); for (T item : items) { al.add(item); return al; |
ArrayList | createArrayList(Object[] a) create Array List ArrayList al = new ArrayList(a.length); for (int i = 0; i < a.length; i++) al.add(a[i]); return al; |
ArrayList | createArrayList(String[] a) create Array List ArrayList<String> b = new ArrayList<String>(); for (int i = 0; i < a.length; i++) { b.add(a[i]); return b; |