Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.Collection; import java.util.Enumeration; public class Main { public static Collection<?> list(final Enumeration<?> e) { final ArrayList<Object> l = new ArrayList<Object>(); if (e != null) { while (e.hasMoreElements()) { final Object object = e.nextElement(); if (object != null) { l.add(object); } } } return l; } }