|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jdmk.Enumerated
public abstract class Enumerated
This class is used for implementing enumerated values. An enumeration is represented by a class derived from Enumerated. The derived class defines what are the permitted values in the enumeration. An enumerated value is represented by an instance of the derived class. It can be represented : - as an integer - as a string
Field Summary | |
---|---|
protected int |
value
This variable keeps the integer form of the enumerated. |
Constructor Summary | |
---|---|
Enumerated()
Construct an enumerated with a default value. |
|
Enumerated(int valueIndex)
Construct an enumerated from its integer form. |
|
Enumerated(java.lang.Integer valueIndex)
Construct an enumerated from its Integer form. |
|
Enumerated(java.lang.String valueString)
Construct an enumerated from its string form. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this enumerated to the specified enumerated. |
protected abstract java.util.Hashtable |
getIntTable()
Returns the hashtable of the integer forms. |
protected abstract java.util.Hashtable |
getStringTable()
Returns the hashtable of the string forms. |
int |
hashCode()
Returns the hash code for this enumerated. |
int |
intValue()
Return the integer form of the enumerated. |
java.lang.String |
toString()
Returns the string form of this enumerated. |
java.util.Enumeration |
valueIndexes()
Returns an Java enumeration of the permitted integers. |
java.util.Enumeration |
valueStrings()
Returns an Java enumeration of the permitted strings. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int value
Constructor Detail |
---|
public Enumerated() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- One of the arguments passed to the method is illegal or inappropriate.public Enumerated(int valueIndex) throws java.lang.IllegalArgumentException
valueIndex
- The integer form.
java.lang.IllegalArgumentException
- One of the arguments passed
to the method is illegal or inappropriate.public Enumerated(java.lang.Integer valueIndex) throws java.lang.IllegalArgumentException
valueIndex
- The Integer form.
java.lang.IllegalArgumentException
- One of the arguments passed to
the method is illegal or inappropriate.public Enumerated(java.lang.String valueString) throws java.lang.IllegalArgumentException
valueString
- The string form.
java.lang.IllegalArgumentException
- One of the arguments passed to
the method is illegal or inappropriate.Method Detail |
---|
public int intValue()
public java.util.Enumeration valueIndexes()
public java.util.Enumeration valueStrings()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to compare with.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected abstract java.util.Hashtable getIntTable()
protected abstract java.util.Hashtable getStringTable()
|
Open Source build 01-ea opendmk-1.0-b01-ea 2010.10.22_13:26:06_UTC |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |