|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jcreme.enumerations.Enumeration
This is the base class for enumerated types. It presents an id (Integer) that may be used to different purpose and a name (String) that enables to handle inputs and outputs of the values. Both are unique for an Enumeration subclass instances. To ensure this uniqueness, subclasses must enable access to two hashtables. One links the names to the enumerated values, the other links the id to the enumerated value.
| Field Summary | |
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
protected |
Enumeration(java.lang.String name)
Creates new Enumeration |
| Method Summary | |
int |
compareTo(java.lang.Object o)
This method enables to compare two enmerated values. |
protected abstract java.util.Hashtable |
getFromName()
This method is for internal use only. |
java.lang.String |
getName()
|
static Enumeration[] |
getValues()
This method enables to retrieve all the possible values of an Enumeration class. |
protected java.lang.Object |
readResolve()
This method enables to ensure the uniqueness of an Enumeration value. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
static final long serialVersionUID
| Constructor Detail |
protected Enumeration(java.lang.String name)
throws java.security.InvalidParameterException
name - the name of this enumerated value. It cannot be null.
java.security.InvalidParameterException - if one of the parameters is null.| Method Detail |
public java.lang.String getName()
public java.lang.String toString()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - the object to compare. It must be an Enumeration instance.
java.lang.ClassCastException - if the parameter is not an Enumeration instance.protected abstract java.util.Hashtable getFromName()
public static Enumeration[] getValues()
protected java.lang.Object readResolve()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||