Android Array to List Convert convertArrayToList(T[] array)

Here you can find the source of convertArrayToList(T[] array)

Description

convert Array To List

Declaration

public static <T> ArrayList<T> convertArrayToList(T[] array) 

Method Source Code

//package com.java2s;
import java.util.ArrayList;

public class Main {
    public static <T> ArrayList<T> convertArrayToList(T[] array) {
        ArrayList<T> ret = new ArrayList<T>(array.length);
        for (T t : array) {
            ret.add(t);/*from   w w  w.  j a v  a 2  s  . co  m*/
        }

        return ret;
    }
}

Related

  1. asList(T... vals)
  2. asList(char[] array)
  3. asList(int[] array)
  4. asList(int[] intArray)
  5. asList(long[] longArray)
  6. listOf(final T... items)
  7. newArrayList(E... elements)
  8. getList(int[] s, String separator, String quote)
  9. getList(String[] s, String separator, String quote)