|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.lang.enum.EnumUtils
Utility class for accessing and manipulating Enums.
Enum
,
ValuedEnum
,
Serialized FormConstructor Summary | |
private |
EnumUtils()
Restricted constructor |
Method Summary | |
static ValuedEnum |
getEnum(java.lang.Class enumClass,
int value)
Gets a ValuedEnum object by class and value. |
static Enum |
getEnum(java.lang.Class enumClass,
java.lang.String name)
Gets an Enum object by class and name. |
static java.util.List |
getEnumList(java.lang.Class enumClass)
Gets the List of Enum objects using the Enum class. |
static java.util.Map |
getEnumMap(java.lang.Class enumClass)
Gets the Map of Enum objects by name using the Enum class. |
static java.util.Iterator |
iterator(java.lang.Class enumClass)
Gets an iterator over the Enum objects in an Enum class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
Constructor Detail |
private EnumUtils()
Method Detail |
public static Enum getEnum(java.lang.Class enumClass, java.lang.String name)
enumClass
- the class of the Enum to getname
- the name of the Enum to get, may be null
java.lang.IllegalArgumentException
- if the enum class is nullpublic static ValuedEnum getEnum(java.lang.Class enumClass, int value)
enumClass
- the class of the Enum to getvalue
- the value of the Enum to get
java.lang.IllegalArgumentException
- if the enum class is nullpublic static java.util.Map getEnumMap(java.lang.Class enumClass)
enumClass
- the class of the Enum to get
java.lang.IllegalArgumentException
- if the enum class is null
java.lang.IllegalArgumentException
- if the enum class is not a subclass of Enumpublic static java.util.List getEnumList(java.lang.Class enumClass)
enumClass
- the class of the Enum to get
java.lang.IllegalArgumentException
- if the enum class is null
java.lang.IllegalArgumentException
- if the enum class is not a subclass of Enumpublic static java.util.Iterator iterator(java.lang.Class enumClass)
enumClass
- the class of the Enum to get
java.lang.IllegalArgumentException
- if the enum class is null
java.lang.IllegalArgumentException
- if the enum class is not a subclass of Enum
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |