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

ListgetArrayListForArray(Object[] rowData)
get Array List For Array
ArrayList<Object> res = new ArrayList<Object>();
for (int n = 0; n < rowData.length; n++) {
    res.add(rowData[n]);
return res;
ArrayListgetArrayListFromInt(int number)
get Array List From Int
ArrayList<Integer> list = new ArrayList<>();
int length = stringSize(number);
for (int i = length - 1; i >= 0; i--) {
    list.add(0, number % 10);
    number /= 10;
return list;
ArrayListgetArrayListFromString(String wordSequence, String separator)
get Array List From String
ArrayList<String> array = new ArrayList<String>();
if (wordSequence != null) {
    StringTokenizer toks = new StringTokenizer(wordSequence, separator);
    while (toks.hasMoreTokens())
        array.add(toks.nextToken());
return array;
ArrayListnewArrayList()
new ArrayList
return new ArrayList<T>();
ArrayListnewArrayList()
Type-safe initializer.
return new ArrayList<T>();
ArrayListnewArrayList()
Convenience ArrayList maker.
return new ArrayList<T>();
ListnewArrayList()
new Array List
return new ArrayList<E>();
ArrayListnewArrayList()
new Array List
ArrayList<T> newArrayList = new ArrayList<T>();
return newArrayList;
ArrayListnewArrayList()
new Array List
return new ArrayList<T>();
ArrayListnewArrayList()
new Array List
return new ArrayList<T>();