|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jurvis.patterns.JvEnumerator
public abstract class JvEnumerator
Base class for enumerators within a C++ style enumeration. Derived classes
are expected to define each of the enumerators as public and
static members of the derived class.
| Constructor Summary | |
|---|---|
protected |
JvEnumerator(Object value,
String string)
Constructs an instance of the Enumerator class with the
specified value and string. |
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one. |
String |
getDisplay()
Return the human-readable string representation of this enumerator. |
protected static Object |
getObject(Class clazz,
Object value)
Return the enumerator defined within clazz having the
specified value. |
protected static Object[] |
getObjects(Class clazz)
Return an array containing all of the enumerators defined within the specified class. |
Object |
getValue()
Returns the value for the enumerator. |
int |
hashCode()
Returns a hash code value for the object. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected JvEnumerator(Object value,
String string)
Enumerator class with the
specified value and string.
value - The value for the enumeration instance.string - The string value of the enumeration.| Method Detail |
|---|
public String getDisplay()
protected static Object[] getObjects(Class clazz)
clazz - the class containing the enumerators
clazz) of the enumerators
protected static Object getObject(Class clazz,
Object value)
clazz having the
specified value.
clazz - the class containing the enumeratorsvalue - the value of the desired enumerator
value or null if no such enumeratorpublic Object getValue()
public boolean equals(Object o)
equals in class Objecto - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwiseObject.equals(java.lang.Object)public int hashCode()
java.util.Hashtable.
hashCode in class ObjectObject.hashCode()public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||