|Modifier||Constructor and Description|
Constructor for the Enumeration object
|Modifier and Type||Method and Description|
Returns a reference to the named member of this Enumeration, throes IllegalArgumentException of name is not found.
Return name a
protected Enumeration(java.lang.String name)
name- Description of Parameter
public 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.
java.lang.IllegalArgumentException- If a member with given
memberNamecannot be found.
public final java.lang.String toString()