Package com.coyotegulch.jisp
Class LongKey
- java.lang.Object
-
- com.coyotegulch.jisp.KeyObject
-
- com.coyotegulch.jisp.LongKey
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable
public class LongKey extends KeyObject
LongKeydefines a key based on thelongtype.- See Also:
KeyObject,ObjectIndex, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(KeyObject key)Compares the invokingLongKeytokey, returning one of theKEY_*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 thelongvalue of aLongKey.KeyObjectmakeNullKey()Returns a "null" (i.e., blank)LongKey, to be used as a space-holder in certain kinds ofObjectIndexes.voidreadExternal(java.io.ObjectInput in)LongKeyimplements the readExternal method to restore its contents.java.lang.StringtoString()Returns theStringrepresentation of aLongKey.voidwriteExternal(java.io.ObjectOutput out)LongKeyimplements thewriteExternalmethod to save its contents.
-
-
-
Method Detail
-
compareTo
public int compareTo(KeyObject key)
Compares the invokingLongKeytokey, returning one of theKEY_*constants based on the relationship of the two keys.
-
makeNullKey
public KeyObject makeNullKey()
Returns a "null" (i.e., blank)LongKey, to be used as a space-holder in certain kinds ofObjectIndexes. The "null" value is 0xFFFFFFFFFFFFFFFF (all ones).- Specified by:
makeNullKeyin classKeyObject- Returns:
- A "null" (i.e., blank)
LongKeyconstant. - See Also:
BTreeIndex
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionLongKeyimplements thewriteExternalmethod to save its contents.- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionLongKeyimplements the readExternal method to restore its contents.- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
longValue
public long longValue()
Returns thelongvalue of aLongKey.- Returns:
- The
longvalue of aLongKey.
-
toString
public java.lang.String toString()
Returns theStringrepresentation of aLongKey.
-
hashCode
public int hashCode()
Returns a hash code value for the object, which is, in effect, the the value of the key.- Overrides:
hashCodein classjava.lang.Object- Returns:
- a hash code value for this object.
- See Also:
Object,HashIndex
-
-