All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.jaw.reference.common.Enumerated
java.lang.Object
|
+----com.sun.jaw.reference.common.Enumerated
- public abstract class Enumerated
- extends Object
- implements Serializable
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
-
Enumerated()
- Construct an enumerated with a default value.
-
Enumerated(int)
- Construct an enumerated from its integer form.
-
Enumerated(Integer)
- Construct an enumerated from its Integer form.
-
Enumerated(String)
- Construct an enumerated from its string form.
-
equals(Object)
- Compares this enumerated to the specified enumerated.
-
hashCode()
- Returns the hash code for this enumerated.
-
intValue()
- Return the integer form of the enumerated.
-
toString()
- Returns the string form of this enumerated.
-
valueIndexes()
- Returns an Java enumeration of the permitted integers.
-
valueStrings()
- Returns an Java enumeration of the permitted strings.
Enumerated
public Enumerated() throws IllegalArgumentException
- Construct an enumerated with a default value.
The default value is the first available in getIntTable().
- Throws: IllegalArgumentException
- One of the arguments passed to the method is illegal or inappropriate.
Enumerated
public Enumerated(int valueIndex) throws IllegalArgumentException
- Construct an enumerated from its integer form.
- Parameters:
- valueIndex - The integer form.
- Throws: IllegalArgumentException
- One of the arguments passed to the method is illegal or inappropriate.
Enumerated
public Enumerated(Integer valueIndex) throws IllegalArgumentException
- Construct an enumerated from its Integer form.
- Parameters:
- valueIndex - The Integer form.
- Throws: IllegalArgumentException
- One of the arguments passed to the method is illegal or inappropriate.
Enumerated
public Enumerated(String valueString) throws IllegalArgumentException
- Construct an enumerated from its string form.
- Parameters:
- valueString - The string form.
- Throws: IllegalArgumentException
- One of the arguments passed to the method is illegal or inappropriate.
intValue
public int intValue()
- Return the integer form of the enumerated.
- Returns:
- The integer form
valueIndexes
public Enumeration valueIndexes()
- Returns an Java enumeration of the permitted integers.
- Returns:
- An enumeration of Integer instances
valueStrings
public Enumeration valueStrings()
- Returns an Java enumeration of the permitted strings.
- Returns:
- An enumeration of String instances
equals
public boolean equals(Object obj)
- Compares this enumerated to the specified enumerated.
The result is true if and only if the argument is not null
and is of the same class.
- Parameters:
- obj - The object to compare with.
- Returns:
- True if this and obj are the same; false otherwise
- Overrides:
- equals in class Object
hashCode
public int hashCode()
- Returns the hash code for this enumerated.
- Returns:
- A hash code value for this object.
- Overrides:
- hashCode in class Object
toString
public String toString()
- Returns the string form of this enumerated.
- Returns:
- The string for for this object.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index