org.apache.xmlbeans

## Class StringEnumAbstractBase

- java.lang.Object
- - org.apache.xmlbeans.StringEnumAbstractBase

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    AllNNI.Member.Enum, Attribute.Use.Enum, BlockSet.Member.Enum, DerivationControl.Enum, DerivationSet.Member.Enum, FileDesc.Role.Enum, FormChoice.Enum, FullDerivationSet.Member.Enum, JavaNameList.Member.Enum, LangAttribute.Lang.Member.Enum, NamespaceList.Member.Enum, NamespaceList.Member.Enum, NamespaceList.Member2.Item.Member.Enum, NamespaceList.Member2.Item.Member.Enum, Qnametargetenum.Enum, SimpleDerivationSet.Member.Enum, SpaceAttribute.Space.Enum, StringEnumValue, WhiteSpaceDocument.WhiteSpace.Value.Enum, Wildcard.ProcessContents.Enum

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

  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StringEnumAbstractBase.Table` Used to manage singleton instances of enumerations.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `StringEnumAbstractBase(String s, int i)` Singleton instances should only be created by subclasses.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `hashCode()` Returns the hash code of the underlying string
    `int` | `intValue()` Returns an int code that can be used for switch statements
    `String` | `toString()` Returns the underlying string value

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### StringEnumAbstractBase

          protected StringEnumAbstractBase(String s,
                                           int i)

      Singleton instances should only be created by subclasses.

  - ### Method Detail

    - #### toString

          public final String toString()

      Returns the underlying string value
      Overrides:
        `toString` in class `Object`

    - #### intValue

          public final int intValue()

      Returns an int code that can be used for switch statements

    - #### hashCode

          public final int hashCode()

      Returns the hash code of the underlying string
      Overrides:
        `hashCode` in class `Object`