Java examples for java.util:List Convert
Convert Enumeration as List
//package com.java2s; import java.util.Enumeration; import java.util.LinkedList; import java.util.List; public class Main { public static <T> List<T> asList(Enumeration<T> e) { List<T> l = new LinkedList<T>(); while (e.hasMoreElements()) { l.add(e.nextElement());/*w w w .j av a 2 s . com*/ } return l; } }