com.coyotegulch.jisp

Class LongKey

public class LongKey extends KeyObject

* LongKey defines a key based on the long type.

See Also: KeyObject ObjectIndex

Constructor Summary
LongKey(long key_value)
Creates a new LongKey with a specific value.
LongKey()
Creates a blank LongKey (value = 0).
Method Summary
intcompareTo(KeyObject key)
Compares the invoking LongKey to key, returning one of the KEY_* constants based on the relationship of the two keys.
inthashCode()
Returns a hash code value for the object, which is, in effect, the the value of the key.
longlongValue()
Returns the long value of a LongKey.
KeyObjectmakeNullKey()
Returns a "null" (i.e., blank) LongKey, to be used as a space-holder in certain kinds of ObjectIndexes.
voidreadExternal(ObjectInput in)
LongKey implements the readExternal method to restore its contents.
StringtoString()
Returns the String representation of a LongKey.
voidwriteExternal(ObjectOutput out)
LongKey implements the writeExternal method to save its contents.

Constructor Detail

LongKey

public LongKey(long key_value)
Creates a new LongKey with a specific value.

Parameters: keyValue value of the newly-created key.

LongKey

public LongKey()
Creates a blank LongKey (value = 0).

Method Detail

compareTo

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

Parameters: key The LongKey value to be compared against the invoking key.

Returns: One of the KEY_* constants based on the relationship of the two keys.

hashCode

public int hashCode()
Returns a hash code value for the object, which is, in effect, the the value of the key.

Returns: a hash code value for this object.

See Also: java.lang.Object HashIndex

longValue

public long longValue()
Returns the long value of a LongKey.

Returns: The long value of a LongKey.

makeNullKey

public KeyObject makeNullKey()
Returns a "null" (i.e., blank) LongKey, to be used as a space-holder in certain kinds of ObjectIndexes. The "null" value is 0xFFFFFFFFFFFFFFFF (all ones).

Returns: A "null" (i.e., blank) LongKey constant.

See Also: BTreeIndex

readExternal

public void readExternal(ObjectInput in)
LongKey implements the readExternal method to restore its contents.

toString

public String toString()
Returns the String representation of a LongKey.

Returns: The String representation of a LongKey.

writeExternal

public void writeExternal(ObjectOutput out)
LongKey implements the writeExternal method to save its contents.