|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EnumFactoryX
The EnumFactoryX allows a client to lookup all values defined for a
particular EnumX
subclass, and also lookup a particular
value by its int or String value. By convention, each
strongly-typed enum subclass declares an EnumFactory constant named
"FACTORY" that can be used to lookup the enums defined by that class.
Note that the getEnum* methods inherited from EnumFactory are
deprecated and will not be supported in the next release. The methods
getEnumX(String)
, getEnumX(int)
and
getAllEnumXs(EnumX[])
must be used instead of getEnum methods.
Method Summary | |
---|---|
EnumX[] |
getAllEnumXs(EnumX[] container)
Returns an array of all EnumXs. |
EnumX |
getEnumX(int value)
Returns the EnumX associated with the passed int value. |
EnumX |
getEnumX(java.lang.String value)
Returns the EnumX associated with the passed String value. |
Methods inherited from interface com.sun.n1.util.enum.EnumFactory |
---|
getAllEnums, getEnum, getEnum |
Method Detail |
---|
EnumX getEnumX(java.lang.String value) throws NoSuchEnumExceptionX
value
- the string value of the desired EnumX.
NoSuchEnumExceptionX
- if no such enum exists.EnumX getEnumX(int value) throws NoSuchEnumExceptionX
value
- the int value of the desired EnumX.
NoSuchEnumExceptionX
- if no such enum exists.EnumX[] getAllEnumXs(EnumX[] container)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |