Java examples for java.util:Enumeration
Creates an Enumeration out of the given Iterator.
import java.util.Enumeration; import java.util.Iterator; public class Main{ public static void main(String[] argv){ Iterator it = java.util.Arrays.asList("asdf","java2s.com").iterator(); System.out.println(createEnumerationFromIterator(it)); }//from www . j a v a2s . c o m /** * Creates an Enumeration out of the given Iterator. * @param <T> * @param it * @return an Enumeration created out of the given Iterator. */ public static <T> Enumeration<T> createEnumerationFromIterator( Iterator<T> it) { return new IteratorEnumerationAdapter<T>(it); } }