public abstract class AbstractEnumerator extends java.lang.Object implements Enumerator, java.io.Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEnumerator(int value,
java.lang.String name)
Creates an initialized instance.
|
protected |
AbstractEnumerator(int value,
java.lang.String name,
java.lang.String literal)
Creates an initialized instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLiteral()
Returns the literal value of the enumerator.
|
java.lang.String |
getName()
Returns the name of the enumerator.
|
int |
getValue()
Returns the
int value of the enumerator. |
java.lang.String |
toString()
Returns the literal value of the enumerator, which is its string representation.
|
protected java.lang.Object |
writeReplace() |
protected AbstractEnumerator(int value,
java.lang.String name)
value - the int value of the enumerator.name - the name of the enumerator, which is also used as the literal value.protected AbstractEnumerator(int value,
java.lang.String name,
java.lang.String literal)
value - the int value of the enumerator.name - the name of the enumerator.literal - the literal value of the enumerator.public final java.lang.String getName()
getName in interface Enumeratorpublic final int getValue()
int value of the enumerator.getValue in interface Enumeratorpublic final java.lang.String getLiteral()
getLiteral in interface Enumeratorpublic final java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.Object writeReplace()
throws java.io.ObjectStreamException
java.io.ObjectStreamExceptionCopyright © 2018. Licensed under the Eclipse Public License v1.0. All rights reserved.
Submit a bug or feature