|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.n1.util.enum.EnumFactoryImpl
public abstract class EnumFactoryImpl
This class is the base implementation of the Enumumeration types. Its not meant to be used directly, only subclasses should be used.
Constructor Summary | |
---|---|
protected |
EnumFactoryImpl()
Creates a new enumeration factory with a default expected size. |
protected |
EnumFactoryImpl(int expectedSize)
Creates a new enum factory that is expected to contain the passed number of enums. |
Method Summary | |
---|---|
Enum[] |
getAllEnums(Enum[] container)
Returns an array of all enums. |
Enum |
getEnum(int value)
Returns the enum associated with the passed int value. |
Enum |
getEnum(java.lang.String value)
Returns the enum associated with the passed string value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected EnumFactoryImpl()
protected EnumFactoryImpl(int expectedSize)
expectedSize
- the expected number of enumsMethod Detail |
---|
public Enum getEnum(java.lang.String value) throws NoSuchEnumException
Note: subclasses of EnumFactory will typcially provide a strongly-typed variant of this method named "get".
getEnum
in interface EnumFactory
value
- the string value of the desired enum.
NoSuchEnumException
- if no such enum exists.public Enum getEnum(int value) throws NoSuchEnumException
Note: subclasses of EnumFactory will typcially provide a strongly-typed variant of this method named "get".
getEnum
in interface EnumFactory
value
- the int value of the desired enum.
NoSuchEnumException
- if no such enum exists.public Enum[] getAllEnums(Enum[] container)
Note: Subclasses of EnumFactory typically provide a strongly-typed no-arg variant of this method named "getAll".
getAllEnums
in interface EnumFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |