Java tutorial
//package com.java2s; import java.util.Collection; import java.util.Enumeration; public class Main { public static <T> Collection<T> collectionEnumerationElements(Enumeration<T> source, Collection<T> target) { while (source.hasMoreElements()) { target.add(source.nextElement()); } return target; } }