org.apache.commons.collections
Class EnumerationUtils
java.lang.Object
org.apache.commons.collections.EnumerationUtils
public class EnumerationUtils
- extends Object
Provides utility methods for Enumeration
instances.
- Since:
- Commons Collections 3.0
- Version:
- $Id: EnumerationUtils.java,v 1.1.1.1 2005/05/23 04:32:53 pents90 Exp $
- Author:
- Matt Hall, John Watkinson, Gary Gregory
Constructor Summary |
EnumerationUtils()
EnumerationUtils is not normally instantiated. |
Method Summary |
static
|
toList(Enumeration<E> enumeration)
Creates a list based on an enumeration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumerationUtils
public EnumerationUtils()
- EnumerationUtils is not normally instantiated.
toList
public static <E> List<E> toList(Enumeration<E> 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 be null
.
- Throws:
NullPointerException
- if the enumeration parameter is null
.
Copyright © 2005-2005 Apache Software Foundation, Matt Hall, John Watkinson. All Rights Reserved.