Java tutorial
//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)); } public static <T> List<T> toList(Enumeration<T> c) { return Collections.list(c); } }