public abstract class Enumeration
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
Enumeration(java.lang.String name)
Constructor for the Enumeration object
|
Modifier and Type | Method and Description |
---|---|
Enumeration |
byName(java.lang.String memberName)
Returns a reference to the named member of this Enumeration, throes IllegalArgumentException
of name is not found.
|
java.lang.String |
toString()
Return name a
|
protected Enumeration(java.lang.String name)
name
- Description of Parameterpublic final Enumeration byName(java.lang.String memberName) throws java.lang.IllegalArgumentException
API NOTE: This method looks as it should have been defines as static. However, this could lead to an unpredictable behavior of this method due to the way Java initializes static member variables of a class. In particular, if this method was static it would be possible to call it before static member variables of the Enumeration class for which it was called were initialized. As a result if this method was static it could throw IllegalArgumentException even when its argument was a valid member name.
memberName
- A name of the Enumeration member.memberName
.java.lang.IllegalArgumentException
- If a member with given memberName
cannot be
found.public final java.lang.String toString()
toString
in class java.lang.Object