Class KeyValue<K,V>

java.lang.Object
com.blackrook.redis.data.KeyValue<K,V>
Type Parameters:
K - the key type.
V - the value type.

public class KeyValue<K,V> extends Object
Object pairs for a bunch of data structures.
Author:
Matthew Tropiano
  • Field Details

    • key

      protected K key
      The key object in the pair.
    • value

      protected V value
      The value object in the pair.
  • Constructor Details

    • KeyValue

      public KeyValue(K key, V value)
      Creates a new object pair.
      Parameters:
      key - the key object.
      value - the value object.
  • Method Details

    • getKey

      public K getKey()
      Returns:
      the key.
    • getValue

      public V getValue()
      Returns:
      the value.
    • setValue

      public void setValue(V value)
      Sets the value to a new value.
      Parameters:
      value - the value of the new value.
    • toString

      public String toString()
      Overrides:
      toString in class Object