Class KeyValuePair<K,​V>

  • Type Parameters:
    K - Key class.
    V - Value class.

    public final class KeyValuePair<K,​V>
    extends java.lang.Object
    Generic key-value pair.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private K key
      Pair key.
      private V value
      Pair value.
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyValuePair​(K key, V value)
      Creates a new pair.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      K getKey()
      Returns the pair key.
      V getValue()
      Returns the pair value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • key

        private K key
        Pair key.
      • value

        private V value
        Pair value.
    • Constructor Detail

      • KeyValuePair

        public KeyValuePair​(K key,
                            V value)
        Creates a new pair.
        Parameters:
        key - Pair key.
        value - Pair value.
    • Method Detail

      • getValue

        public V getValue()
        Returns the pair value.
        Returns:
        Pair value.
      • getKey

        public K getKey()
        Returns the pair key.
        Returns:
        Pair key.