public class LongKey extends KeyObject
LongKey defines a key based on the long type.KeyObject,
ObjectIndex,
Serialized Form| Constructor and Description |
|---|
LongKey()
Creates a blank
LongKey (value = 0). |
LongKey(long key_value)
Creates a new
LongKey with a specific value. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(KeyObject key)
Compares the invoking
LongKey to key, returning one of the
KEY_* 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 the
long value of a LongKey. |
KeyObject |
makeNullKey()
Returns a "null" (i.e., blank)
LongKey, to be used as a space-holder in certain kinds of
ObjectIndexes. |
void |
readExternal(java.io.ObjectInput in)
LongKey implements the readExternal method to restore its contents. |
java.lang.String |
toString()
Returns the
String representation of a LongKey. |
void |
writeExternal(java.io.ObjectOutput out)
LongKey implements the writeExternal method to save its
contents. |
public LongKey(long key_value)
LongKey with a specific value.keyValue - value of the newly-created key.public LongKey()
LongKey (value = 0).public int compareTo(KeyObject key)
LongKey to key, returning one of the
KEY_* constants based on the relationship of the two keys.
public KeyObject makeNullKey()
LongKey, to be used as a space-holder in certain kinds of
ObjectIndexes. The "null" value is 0xFFFFFFFFFFFFFFFF (all ones).makeNullKey in class KeyObjectLongKey constant.BTreeIndexpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
LongKey implements the writeExternal method to save its
contents.java.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
LongKey implements the readExternal method to restore its contents.java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic long longValue()
long value of a LongKey.long value of a LongKey.public java.lang.String toString()
String representation of a LongKey.public int hashCode()
hashCode in class java.lang.ObjectObject,
HashIndex