Eidola home

org.eidola.util
Class EnumeratedType

java.lang.Object
  |
  +--org.eidola.util.EnumeratedType
Direct Known Subclasses:
ContainerPart

public abstract class EnumeratedType
extends Object

An alternative to using hand-assigned integer constants for enumerated types. Subclass to create your own enumerated type:

public final class ColorType extends EnumeratedType
{
static public RED = new ColorType( "red" );
static public GREEN = new ColorType( "green" );
static public BLUE = new ColorType( "blue" );
private ColorType( String type ) { super( type ); }
}

Version:
[Development version]
Author:
Kendall Helmstetter Gelner, Paul Cantrell

Constructor Summary
protected EnumeratedType(String name)
          Creates a new enumerated type value.
 
Method Summary
 String getName()
          Returns the name of this enumerated type value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumeratedType

protected EnumeratedType(String name)
Creates a new enumerated type value.
Method Detail

getName

public String getName()
Returns the name of this enumerated type value.

Eidola home