Java List from Array asList(Collection coll)

Here you can find the source of asList(Collection coll)

Description

as List

License

Apache License

Declaration

public static <T> List<T> asList(Collection<T> coll) 

Method Source Code


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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

import java.util.List;

public class Main {
    public static <T> List<T> asList(T... objs) {
        return Arrays.asList(objs);
    }/*from w w w .ja v  a 2 s.  c o m*/

    public static <T> List<T> asList(Collection<T> coll) {
        return new ArrayList<T>(coll);
    }
}

Related

  1. asList(Class... classesArray)
  2. asList(Collection collection)
  3. asList(Collection collection, Class type)
  4. asList(Collection values)
  5. asList(Collection c)
  6. asList(Collection collection)
  7. asList(double[] array)
  8. asList(E... elements)
  9. asList(E... pEntities)