Class Pair<K,​V>

  • Type Parameters:
    K -
    V -

    public class Pair<K,​V>
    extends java.lang.Object
    A utility class for storing a pair of objects
    • Constructor Detail

      • Pair

        public Pair​(K key,
                    V value)
        Parameters:
        key -
        value -
      • Pair

        public Pair()
    • Method Detail

      • getKey

        public K getKey()
        Returns:
        key
      • setKey

        public void setKey​(K key)
        Parameters:
        key -
      • getValue

        public V getValue()
        Returns:
        value
      • setValue

        public void setValue​(V value)
        Parameters:
        value -
      • toString

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

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

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