Here you can find the source of asList(Collection
public static <T> List<T> asList(Collection<T> collection)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Collection; import java.util.List; public class Main { public static <T> List<T> asList(Collection<T> collection) { return new ArrayList<T>(collection); }/* w ww. ja va 2 s . c om*/ }