Class Pair<K,V>

java.lang.Object
me.zacharias.chat.core.Pair<K,V>
Type Parameters:
K - The key type
V - The value type

public class Pair<K,V> extends Object
A simple Pair class.
  • Constructor Details

    • Pair

      public Pair(K key, V value)
      Creates a new instance of Pair.
      Parameters:
      key - The key of the pair
      value - The value of the pair
  • Method Details

    • getKey

      public K getKey()
      Gets the key of the pair.
      Returns:
      The key of the pair
    • getValue

      public V getValue()
      Gets the value of the pair.
      Returns:
      The value of the pair
    • setKey

      public void setKey(K key)
      Sets the key of the pair.
      Parameters:
      key - The key of the pair
    • setValue

      public void setValue(V value)
      Sets the value of the pair.
      Parameters:
      value - The value of the pair