Utility class for accessing and manipulating
Enum s.
See Also:Enum See Also:ValuedEnum author: Stephen Colebourne author: Gary Gregory since: 2.1 (class existed in enum package from v1.0) version: $Id: EnumUtils.java 437554 2006-08-28 06:21:41Z bayard $
Parameters: enumClass - the class of the Enum to get Parameters: name - the name of the Enum to get, may be null the enum object throws: IllegalArgumentException - if the enum class is null
Parameters: enumClass - the class of the Enum to get Parameters: value - the value of the Enum to get the enum object, or null if the enum does not exist throws: IllegalArgumentException - if the enum class is null
Gets the List of Enum objects using
the Enum class.
The list is in the order that the objects were created
(source code order).
If the requested class has no enum objects an empty
List is returned. The List is unmodifiable.
Parameters: enumClass - the class of the Enum to get the enum object Map throws: IllegalArgumentException - if the enum class is null throws: IllegalArgumentException - if the enum class is not a subclassof Enum
Gets the Map of Enum objects by
name using the Enum class.
If the requested class has no enum objects an empty
Map is returned. The Map is unmodifiable.
Parameters: enumClass - the class of the Enum to get the enum object Map throws: IllegalArgumentException - if the enum class is null throws: IllegalArgumentException - if the enum class is not a subclassof Enum
Gets an Iterator over the Enum objects
in an Enum class.
The iterator is in the order that the objects were created
(source code order).
If the requested class has no enum objects an empty
Iterator is returned. The Iterator
is unmodifiable.
Parameters: enumClass - the class of the Enum to get an Iterator of the Enum objects throws: IllegalArgumentException - if the enum class is null throws: IllegalArgumentException - if the enum class is not a subclass of Enum