StringEnumAbstractBase Class
com.bea.xml
StringEnumAbstractBase Class
- public class StringEnumAbstractBase
extends Object
implements Serializable
The base class for code-generated string enumeration value classes.
Subclasses are intended to be final types with a finite set of
singleton instances. Each instance has a string value, which
it returns via StringEnumAbstractBase.toString(), and an int value for the purpose
of switching in case statements, returned via StringEnumAbstractBase.intValue().
Each subclass manages an instance of StringEnumAbstractBase.Table,
which holds all the singleton instances for the subclass. A Table
can return a singleton instance given a String or an integer code.
-
Hierarchy
-
Object
StringEnumAbstractBase
-
All Implemented Interfaces
-
Serializable
public final int |
-
hashCode()
- Returns the hash code of the underlying string
|
public final int |
-
intValue()
- Returns an int code that can be used for switch statements
|
public final String |
-
toString()
- Returns the underlying string value
|
StringEnumAbstractBase
protected StringEnumAbstractBase(String s,
int i)
- Singleton instances should only be created by subclasses.
hashCode() Method
public final int hashCode()
Returns the hash code of the underlying string
-
Overrides
-
Object.hashCode()
intValue() Method
public final int intValue()
Returns an int code that can be used for switch statements
toString() Method
public final String toString()
Returns the underlying string value
-
Overrides
-
Object.toString()