View Javadoc

1   package ca.uhn.hl7v2.testpanel.util;
2   
3   import java.util.ArrayList;
4   import java.util.Enumeration;
5   import java.util.List;
6   
7   public class CollectionUtils {
8   
9   	public static <T> List<T> enumerationToList(Enumeration<T> theEnumeration) {
10  		ArrayList<T> retVal = new ArrayList<T>();
11  		while (theEnumeration.hasMoreElements()) {
12  			retVal.add(theEnumeration.nextElement());
13  		}
14  		return retVal;
15  	}
16  
17  }