Java List from Array asList(T[] array)

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

Description

as List

License

Apache License

Declaration

public static <T> List<T> asList(T[] array) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static <T> List<T> asList(T[] array) {
        List<T> list = new ArrayList<T>();

        for (T t : array) {
            list.add(t);//from  www .  java 2  s.co  m
        }

        return list;
    }
}

Related

  1. asList(T[] a)
  2. asList(T[] array)
  3. asList(T[] array)
  4. asList(T[] array)
  5. asList(T[] array)
  6. asListFromObjectArray(Object[] at)
  7. convertArrayToList(int[] ids)
  8. convertArrayToList(List list, String[] strs)
  9. convertArrayToList(Object value)