Class Pair<K,V>

java.lang.Object
de.galan.commons.util.Pair<K,V>
Type Parameters:
K - Type of key
V - Type of value

public class Pair<K,V> extends Object
Simple key/value pair.

Alternative suggested implementations (although jackson deserialization has issues):
  • java.util.AbstractMap.SimpleEntry
  • subclasses of org.apache.commons.lang3.tuple.Pair
  • Constructor Details

    • Pair

      public Pair()
    • Pair

      public Pair(K key, V value)
  • Method Details

    • of

      public static <K, V> Pair of(K key, V value)
    • getKey

      public K getKey()
    • setKey

      public void setKey(K key)
    • k

      public Pair<K,V> k(K k)
    • getValue

      public V getValue()
    • setValue

      public void setValue(V value)
    • v

      public Pair<K,V> v(V v)
    • toString

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

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object