Package com.coyotegulch.jisp
Class LongKey
java.lang.Object
com.coyotegulch.jisp.KeyObject
com.coyotegulch.jisp.LongKey
- All Implemented Interfaces:
Externalizable
,Serializable
LongKey
defines a key based on the long
type.- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
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
Returns thelong
value of aLongKey
.Returns a "null" (i.e., blank)LongKey
, to be used as a space-holder in certain kinds ofObjectIndexes
.void
LongKey
implements the readExternal method to restore its contents.toString()
Returns theString
representation of aLongKey
.void
LongKey
implements thewriteExternal
method to save its contents.
-
Constructor Details
-
LongKey
public LongKey(long key_value) Creates a newLongKey
with a specific value.- Parameters:
keyValue
- value of the newly-created key.
-
LongKey
public LongKey()Creates a blankLongKey
(value = 0).
-
-
Method Details
-
compareTo
Compares the invokingLongKey
tokey
, returning one of theKEY_*
constants based on the relationship of the two keys. -
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:
-
writeExternal
LongKey
implements thewriteExternal
method to save its contents.- Throws:
IOException
-
readExternal
LongKey
implements the readExternal method to restore its contents.- Throws:
IOException
ClassNotFoundException
-
longValue
public long longValue()Returns thelong
value of aLongKey
.- Returns:
- The
long
value of aLongKey
.
-
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.
-