com.coyotegulch.jisp
Class StringKey

java.lang.Object
  extended bycom.coyotegulch.jisp.OrderedObject
      extended bycom.coyotegulch.jisp.StringKey
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class StringKey
extends OrderedObject

StringKey defines a variable-length string key.

See Also:
OrderedObject, ObjectIndex, Serialized Form

Field Summary
 
Fields inherited from class com.coyotegulch.jisp.OrderedObject
KEY_EQUAL, KEY_ERROR, KEY_LESS, KEY_MORE
 
Constructor Summary
StringKey()
          Creates a blank (null) StringKey.
StringKey(java.lang.String key_value)
          Creates a new StringKey using key_value.
 
Method Summary
 int compareTo(OrderedObject key)
          Compares the invoking StringKey to key, returning one of the KEY_* constants based on the relationship of the two keys.
 void readExternal(java.io.ObjectInput in)
          StringKey implements the readExternal method to restore its contents.
 java.lang.String toString()
          Returns the String representation of a StringKey.
 void writeExternal(java.io.ObjectOutput out)
          StringKey implements the writeExternal method to save its contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringKey

public StringKey(java.lang.String key_value)
Creates a new StringKey using key_value.

Parameters:
key_value - The text of the newly-created key.

StringKey

public StringKey()
Creates a blank (null) StringKey.

Method Detail

compareTo

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

Specified by:
compareTo in class OrderedObject
Parameters:
key - The StringKey value to be compared against the invoking key.
Returns:
one of the KEY_* constants based on the relationship of the two keys.

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
StringKey implements the writeExternal method to save its contents.

Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
StringKey implements the readExternal method to restore its contents.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

toString

public java.lang.String toString()
Returns the String representation of a StringKey.

Returns:
String representation of a StringKey.