org.eclipse.emf.common.util
Class AbstractEnumerator
java.lang.Object
|
+--org.eclipse.emf.common.util.AbstractEnumerator
- All Implemented Interfaces:
- Enumerator
- Direct Known Subclasses:
- GenPropertyKind, GenProviderKind, GenResourceKind
- public abstract class AbstractEnumerator
- extends java.lang.Object
- implements Enumerator
An extensible enumerator implementation.
Constructor Summary |
protected |
AbstractEnumerator(int value,
java.lang.String name)
Creates an initialized instance. |
Method Summary |
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 name of the enumerator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractEnumerator
protected AbstractEnumerator(int value,
java.lang.String name)
- Creates an initialized instance.
- Parameters:
value
- the int
value of the enumerator.name
- the name of the enumerator.
getName
public final java.lang.String getName()
- Returns the name of the enumerator.
- Specified by:
getName
in interface Enumerator
- Returns:
- the name.
getValue
public final int getValue()
- Returns the
int
value of the enumerator.
- Specified by:
getValue
in interface Enumerator
- Returns:
- the value.
toString
public final java.lang.String toString()
- Returns the name of the enumerator.
- Overrides:
toString
in class java.lang.Object
- Returns:
- the name.