Class KeyValue

java.lang.Object
com.apple.foundationdb.KeyValue
Direct Known Subclasses:
MappedKeyValue

public class KeyValue extends 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

    Modifier and Type
    Method
    Description
    boolean
     
    byte[]
    Gets the key from the pair.
    byte[]
    Gets the value from the pair.
    int
     
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • 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 Details

    • 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(Object obj)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object