Here you can find the source of asList(Collection
public static final <K> ArrayList<K> asList(Collection<K> values)
//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)); } }