Here you can find the source of toList(Collection
public static <T> List<T> toList(Collection<T> c)
//package com.java2s; //License from project: Open Source License import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.List; public class Main { public static <T> List<T> toList(Collection<T> c) { return Collections.list(Collections.enumeration(c)); }//from w ww . j a v a 2 s . co m public static <T> List<T> toList(Enumeration<T> c) { return Collections.list(c); } }