|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Objectorg.apache.commons.lang.enum.EnumUtils
Utility class for accessing and manipulating Enums.
Enum,
ValuedEnum| コンストラクタの概要 | |
EnumUtils()
Public constructor. |
|
| メソッドの概要 | |
static ValuedEnum |
getEnum(Class enumClass,
int value)
Gets a ValuedEnum object by class and value. |
static Enum |
getEnum(Class enumClass,
String name)
Gets an Enum object by class and name. |
static List |
getEnumList(Class enumClass)
Gets the List of Enum objects using
the Enum class. |
static Map |
getEnumMap(Class enumClass)
Gets the Map of Enum objects by
name using the Enum class. |
static Iterator |
iterator(Class enumClass)
Gets an Iterator over the Enum objects
in an Enum class. |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public EnumUtils()
| メソッドの詳細 |
public static Enum getEnum(Class enumClass,
String name)
Gets an Enum object by class and name.
enumClass - the class of the Enum to getname - the name of the Enum to get, may be null
IllegalArgumentException - if the enum class is null
public static ValuedEnum getEnum(Class enumClass,
int value)
Gets a ValuedEnum object by class and value.
enumClass - the class of the Enum to getvalue - the value of the Enum to get
IllegalArgumentException - if the enum class is nullpublic static Map getEnumMap(Class enumClass)
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.
enumClass - the class of the Enum to get
IllegalArgumentException - if the enum class is null
IllegalArgumentException - if the enum class is not a subclass
of Enumpublic static List getEnumList(Class enumClass)
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.
enumClass - the class of the Enum to get
IllegalArgumentException - if the enum class is null
IllegalArgumentException - if the enum class is not a subclass
of Enumpublic static Iterator iterator(Class enumClass)
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.
enumClass - the class of the Enum to get
Iterator of the Enum objects
IllegalArgumentException - if the enum class is null
IllegalArgumentException - if the enum class is not a subclass of Enum
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||