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
LongKey
defines a key based on thelong
type.- See Also:
KeyObject
,ObjectIndex
, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(KeyObject key)
Compares the invokingLongKey
tokey
, returning one of theKEY_*
constants based on the relationship of the two keys.int
hashCode()
Returns a hash code value for the object, which is, in effect, the the value of the key.long
longValue()
Returns thelong
value of aLongKey
.KeyObject
makeNullKey()
Returns a "null" (i.e., blank)LongKey
, to be used as a space-holder in certain kinds ofObjectIndexes
.void
readExternal(java.io.ObjectInput in)
LongKey
implements the readExternal method to restore its contents.java.lang.String
toString()
Returns theString
representation of aLongKey
.void
writeExternal(java.io.ObjectOutput out)
LongKey
implements thewriteExternal
method to save its contents.
-
-
-
Method Detail
-
compareTo
public int compareTo(KeyObject key)
Compares the invokingLongKey
tokey
, 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:
makeNullKey
in classKeyObject
- Returns:
- A "null" (i.e., blank)
LongKey
constant. - See Also:
BTreeIndex
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
LongKey
implements thewriteExternal
method to save its contents.- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
LongKey
implements the readExternal method to restore its contents.- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
longValue
public long longValue()
Returns thelong
value of aLongKey
.- Returns:
- The
long
value of aLongKey
.
-
toString
public java.lang.String toString()
Returns theString
representation 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:
hashCode
in classjava.lang.Object
- Returns:
- a hash code value for this object.
- See Also:
Object
,HashIndex
-
-