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


Constructor Index

 o Enumerated()
Construct an enumerated with a default value.
 o Enumerated(int)
Construct an enumerated from its integer form.
 o Enumerated(Integer)
Construct an enumerated from its Integer form.
 o Enumerated(String)
Construct an enumerated from its string form.

Method Index

 o equals(Object)
Compares this enumerated to the specified enumerated.
 o hashCode()
Returns the hash code for this enumerated.
 o intValue()
Return the integer form of the enumerated.
 o toString()
Returns the string form of this enumerated.
 o valueIndexes()
Returns an Java enumeration of the permitted integers.
 o valueStrings()
Returns an Java enumeration of the permitted strings.

Constructors

 o 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.
 o 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.
 o 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.
 o 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.

Methods

 o intValue
 public int intValue()
Return the integer form of the enumerated.

Returns:
The integer form
 o valueIndexes
 public Enumeration valueIndexes()
Returns an Java enumeration of the permitted integers.

Returns:
An enumeration of Integer instances
 o valueStrings
 public Enumeration valueStrings()
Returns an Java enumeration of the permitted strings.

Returns:
An enumeration of String instances
 o 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
 o hashCode
 public int hashCode()
Returns the hash code for this enumerated.

Returns:
A hash code value for this object.
Overrides:
hashCode in class Object
 o 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