Class KeyValue

  • Direct Known Subclasses:
    MappedKeyValue

    public class KeyValue
    extends java.lang.Object
    A key/value pair. Range read operation on FoundationDB return KeyValues. This is a simple value type; mutating it won't affect your Transaction or the Database.
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyValue​(byte[] key, byte[] value)
      Constructs a new KeyValue from the specified key and value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      byte[] getKey()
      Gets the key from the pair.
      byte[] getValue()
      Gets the value from the pair.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • KeyValue

        public KeyValue​(byte[] key,
                        byte[] value)
        Constructs a new KeyValue from the specified key and value.
        Parameters:
        key - the key portion of the pair
        value - the value portion of the pair
    • Method Detail

      • getKey

        public byte[] getKey()
        Gets the key from the pair.
        Returns:
        the key
      • getValue

        public byte[] getValue()
        Gets the value from the pair.
        Returns:
        the value
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object