Java examples for java.util:List Creation
Create a list from an enumeration
//package com.java2s; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; public class Main { /**/* w w w .j a va 2 s .com*/ * Create a list from an enumeration * * @param e the enumeration * @return the list */ public static List list(Enumeration e) { ArrayList result = new ArrayList(); while (e.hasMoreElements()) result.add(e.nextElement()); return result; } }