Package org.apache.commons.collections
Class EnumerationUtils
- java.lang.Object
-
- org.apache.commons.collections.EnumerationUtils
-
public class EnumerationUtils extends Object
Provides utility methods forEnumeration
instances.- Since:
- Commons Collections 3.0
- Version:
- $Id: EnumerationUtils.java 646777 2008-04-10 12:33:15Z niallp $
- Author:
- Gary Gregory
-
-
Constructor Summary
Constructors Constructor Description EnumerationUtils()
EnumerationUtils is not normally instantiated.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List
toList(Enumeration enumeration)
Creates a list based on an enumeration.
-
-
-
Method Detail
-
toList
public static List toList(Enumeration enumeration)
Creates a list based on an enumeration.As the enumeration is traversed, an ArrayList of its values is created. The new list is returned.
- Parameters:
enumeration
- the enumeration to traverse, which should not benull
.- Throws:
NullPointerException
- if the enumeration parameter isnull
.
-
-