com.virtuosotechnologies.lib.base
Class BasicEnumeratedType

java.lang.Object
  extended bycom.virtuosotechnologies.lib.base.UniqueObject
      extended bycom.virtuosotechnologies.lib.base.BasicEnumeratedType
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
CommandManager.CommandCategory, DatabaseEvent.Type, ObjectDequeEvent.Type, ObjectSetEvent.Type, SearchParameters.Strength, UniqueHierarchicalType

public class BasicEnumeratedType
extends UniqueObject
implements Comparable

A UniqueObject that implements Comparable so it is useful as a base class for enumerated types.


Constructor Summary
BasicEnumeratedType()
          Default constructor using a default description.
BasicEnumeratedType(String description)
          Construct a SingletonKey with a description
 
Method Summary
 int compareTo(Object o)
          Comparable implementation.
 
Methods inherited from class com.virtuosotechnologies.lib.base.UniqueObject
equals, getUniqueObjectID, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicEnumeratedType

public BasicEnumeratedType()
Default constructor using a default description.


BasicEnumeratedType

public BasicEnumeratedType(String description)
Construct a SingletonKey with a description

Parameters:
description - description string for toString(). It is okay to pass null, in which case toString() will return an automatically-generated default string.
Method Detail

compareTo

public final int compareTo(Object o)
Comparable implementation. Uses toString() comparison. If the generated strings are equal, it falls back on the unique object ID, which is guaranteed to be unique. Final.

Specified by:
compareTo in interface Comparable