|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.plotnix.enum.Enum
Enum represents a value characterized by the following properties:
public static Enum
field
declared on this Enum's own class for this enum. If there is
no such name and the string value was not explicitly specified in the
constructor, then the string value is a string representation of the
Enum's integer value.
Constructor Summary | |
protected |
Enum()
Initialize the Enum, using default integer and string values. |
protected |
Enum(int integer)
Initialize the Enum with an integer value. |
protected |
Enum(int integer,
java.lang.String label)
Initialize the Enum with an integer value and a default label. |
protected |
Enum(java.lang.String string)
Initialize the Enum with a string value. |
protected |
Enum(java.lang.String string,
java.lang.String label)
Initialize the Enum with a string value and a default label. |
Method Summary | |
static Enum[] |
enum(java.lang.Class enumClass)
Returns an array of all Enums of the specified class in the order they were created. |
static Enum |
enum(java.lang.Class enumClass,
int integer)
Returns the Enum of the specified class that has the specified integer value, or null if there is no such Enum. |
static Enum |
enum(java.lang.Class enumClass,
java.lang.String string)
Returns the Enum of the specified class that has the specified st, or null if there is no such Enum. |
protected static void |
initIntegerEnum(java.lang.Class enumClass)
|
int |
intValue()
Returns the Enum's integer value. |
protected static void |
loadEnum(java.lang.Class enumClass)
Loads properties from an enumClass.properties resource file. |
protected static void |
loadIntegerEnum(java.lang.Class enumClass)
Loads properties from an enumClass.properties resource file. |
protected java.lang.Object |
readResolve()
Ensures uniqueness of Enums during deserialization. |
java.lang.String |
stringValue()
Returns the string value of this Enum. |
java.lang.String |
toString()
Returns this Enum's human readable description in the default locale. |
java.lang.String |
toString(java.util.Locale locale)
Returns this Enum's human readable description in the specified locale. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected Enum()
protected Enum(java.lang.String string)
protected Enum(java.lang.String string, java.lang.String label)
protected Enum(int integer)
protected Enum(int integer, java.lang.String label)
Method Detail |
public java.lang.String stringValue()
public static Enum
,
the name of that field is returned.public static int
,
and registered with initIntegerEnum
,
the name of that integer field is returned.public int intValue()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.util.Locale locale)
public static Enum[] enum(java.lang.Class enumClass)
public static Enum enum(java.lang.Class enumClass, java.lang.String string)
public static Enum enum(java.lang.Class enumClass, int integer)
protected static void initIntegerEnum(java.lang.Class enumClass)
protected static void loadEnum(java.lang.Class enumClass)
protected static void loadIntegerEnum(java.lang.Class enumClass)
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |