org.apache.xmlbeans
public class: StringEnumAbstractBase [javadoc |
source]
java.lang.Object
org.apache.xmlbeans.StringEnumAbstractBase
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
StringEnumValue, Enum
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 #toString , and an int value for the purpose
of switching in case statements, returned via #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.
| Nested Class Summary: |
|---|
| public static final class | StringEnumAbstractBase.Table | Used to manage singleton instances of enumerations.
Each subclass of StringEnumAbstractBase has an instance
of a table to hold the singleton instances. |
| Method from org.apache.xmlbeans.StringEnumAbstractBase Detail: |
public final int hashCode() {
return _string.hashCode();
}
Returns the hash code of the underlying string |
public final int intValue() {
return _int;
}
Returns an int code that can be used for switch statements |
public final String toString() {
return _string;
}
Returns the underlying string value |