Java List from Array asList(Collection values)

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

Description

Creates a new ArrayList from a collection by building an enumeration over the collection.

License

Open Source License

Declaration

public static final <K> ArrayList<K> asList(Collection<K> values) 

Method Source Code

//package com.java2s;

import java.util.ArrayList;

import java.util.Collection;
import java.util.Collections;

public class Main {
    /**/*from   ww w .jav  a  2  s.  c o  m*/
     * Creates a new {@link ArrayList} from a collection by building an
     * enumeration over the collection.
     */
    public static final <K> ArrayList<K> asList(Collection<K> values) {
        return Collections.list(Collections.<K>enumeration(values));
    }
}

Related

  1. asList(boolean[] array)
  2. asList(byte[] array)
  3. asList(Class... classesArray)
  4. asList(Collection collection)
  5. asList(Collection collection, Class type)
  6. asList(Collection c)
  7. asList(Collection coll)
  8. asList(Collection collection)
  9. asList(double[] array)