Java Utililty Methods Array to ArrayList

List of utility methods to do Array to ArrayList

Description

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

Method

ListtoArrayList(Object pObject)
to Array List
List array;
if (pObject == null) {
    array = new ArrayList(1);
else if (pObject instanceof String) {
    array = new ArrayList(1);
    array.add(pObject);
else {
    String[] lObjectArray = (String[]) pObject;
    array = new ArrayList(lObjectArray.length);
    for (int i = 0; i < lObjectArray.length; i++) {
        array.add(lObjectArray[i]);
return array;
ArrayListtoArrayList(String str)
Parses a formated string and returns an array.
int[] tmp = toArray(str);
ArrayList<Integer> list = new ArrayList<Integer>();
for (int i = 0; i < tmp.length; i++) {
    list.add(tmp[i]);
return list;
ListtoArrayList(String[] ss)
to Array List
List<String> list = new ArrayList<String>();
for (String s : ss)
    list.add(s);
return list;
ListtoArrayList(T... items)
to Array List
List<T> list = new ArrayList<>(items.length);
for (T item : items)
    list.add(item);
return list;
ListtoArrayList(T[] vals)
to Array List
List<T> list = new ArrayList<T>();
for (T val : vals) {
    list.add(val);
return list;
ArrayList[]toArrayListArr(ArrayList al)
to Array List Arr
return (ArrayList[]) al.toArray(arrayListArr);
ListtoByteArrayList(byte[] list)
to Byte Array List
List<Byte> ret = new ArrayList<>();
for (byte b : list) {
    ret.add(b);
return ret;