Class AbstractKeyValue<K,​V>

    • Constructor Detail

      • AbstractKeyValue

        protected AbstractKeyValue​(K key,
                                   V value)
        Constructs a new pair with the specified key and given value.
        Parameters:
        key - the key for the entry, may be null
        value - the value for the entry, may be null
    • Method Detail

      • getKey

        public K getKey()
        Gets the key from the pair.
        Specified by:
        getKey in interface KeyValue<K,​V>
        Returns:
        the key
      • setKey

        protected K setKey​(K key)
      • getValue

        public V getValue()
        Gets the value from the pair.
        Specified by:
        getValue in interface KeyValue<K,​V>
        Returns:
        the value
      • setValue

        protected V setValue​(V value)
      • toString

        public String toString()
        Gets a debugging String view of the pair.
        Overrides:
        toString in class Object
        Returns:
        a String view of the entry