Java Utililty Methods ArrayList Create

List of utility methods to do ArrayList Create

Description

The list of methods to do ArrayList Create are organized into topic(s).

Method

ArrayListcreateArrayList(T... objects)
Initializes an ArrayList with objects.
ArrayList<T> arrayList = new ArrayList<T>();
Collections.addAll(arrayList, objects);
return arrayList;
ListcreateArrayListFilledIncrement(int count)
create Array List Filled Increment
List<Integer> fieldIdList = new ArrayList<Integer>(count);
for (int i = 0; i < count; i++) {
    fieldIdList.add(i);
return fieldIdList;
ArrayList>createArrayListOfArrayList(int size)
create Array List Of Array List
ArrayList<ArrayList<E>> arrayList = new ArrayList<ArrayList<E>>(size);
for (int i = 0; i < size; i++) {
    arrayList.add(new ArrayList<E>());
return arrayList;
ArrayListgetArrayList()
get Array List
return new ArrayList();
ArrayListgetArrayList()
Return a basic ArrayList
return new ArrayList<T>(0);
ListgetArrayList()
get Array List
return new ArrayList<E>();
ListgetArrayList(final Object o, final Class clazz)
Cast an object into a typed ArrayList .
final List<T> list = new ArrayList<>();
list(list, o, clazz);
return list;
ListgetArrayList(List list)
get Array List
if (list == null)
    return new ArrayList<L>();
return list;
ArrayListgetArrayList(Map map, Object obj)
get Array List
ArrayList list = (ArrayList) map.get(obj);
if (list == null) {
    list = new ArrayList();
    map.put(obj, list);
return list;
ArrayListgetArrayList(String[] args)
get Array List
if (args == null) {
    return null;
ArrayList result = new ArrayList(args.length);
for (int i = 0; i < args.length; i++) {
    result.add(args[i]);
return result;
...