com.coyotegulch.jisp
Class OrderedObject

java.lang.Object
  extended bycom.coyotegulch.jisp.OrderedObject
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
IntKey, LongKey, StringKey

public abstract class OrderedObject
extends java.lang.Object
implements java.io.Externalizable

OrderedObject defines an characteristics of an object to be used as a key * in an ObjectIndex. Since Java lacks true generic types, it is up to * the programmer to ensure that all KeyObjects have the same concrete type * for a given ObjectIndex. Each ObjectIndex supports a single * concrete KeyObject type. *

* Concrete KeyObject classes must always produce a

See Also:
ObjectIndex, Serialized Form

Field Summary
static int KEY_EQUAL
          Returned by compareTo when the invoking key is greater than the parameter key.
static int KEY_ERROR
          Returned by compareTo when the invoking key has a different type from the parameter key.
static int KEY_LESS
          Returned by compareTo when the invoking key is less than the parameter key.
static int KEY_MORE
          Returned by compareTo when the invoking key equals the parameter key.
 
Constructor Summary
OrderedObject()
           
 
Method Summary
abstract  int compareTo(OrderedObject key)
          Compares the invoking object to key, returning one of the KEY_* constants based on the relationship of the two keys.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Field Detail

KEY_LESS

public static final int KEY_LESS
Returned by compareTo when the invoking key is less than the parameter key.

See Also:
Constant Field Values

KEY_EQUAL

public static final int KEY_EQUAL
Returned by compareTo when the invoking key is greater than the parameter key.

See Also:
Constant Field Values

KEY_MORE

public static final int KEY_MORE
Returned by compareTo when the invoking key equals the parameter key.

See Also:
Constant Field Values

KEY_ERROR

public static final int KEY_ERROR
Returned by compareTo when the invoking key has a different type from the parameter key.

See Also:
Constant Field Values
Constructor Detail

OrderedObject

public OrderedObject()
Method Detail

compareTo

public abstract int compareTo(OrderedObject key)
Compares the invoking object to key, returning one of the KEY_* constants based on the relationship of the two keys.

Parameters:
key - The key value to be compared against the invoking key. * @return One of the KEY_* constants based on the relationship of the two keys.