Class LongKey

    • Constructor Summary

      Constructors 
      Constructor Description
      LongKey()
      Creates a blank LongKey (value = 0).
      LongKey​(long key_value)
      Creates a new LongKey with a specific value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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.

        Specified by:
        compareTo in class KeyObject
        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.
      • 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).
        Specified by:
        makeNullKey in class KeyObject
        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 the writeExternal 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 the long value of a LongKey.
        Returns:
        The long value of a LongKey.
      • toString

        public java.lang.String toString()
        Returns the String representation of a LongKey.
        Overrides:
        toString in class KeyObject
        Returns:
        The String representation of a LongKey.
      • 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 class java.lang.Object
        Returns:
        a hash code value for this object.
        See Also:
        Object, HashIndex