Class AbstractKeyValue<K,​V>

  • Type Parameters:
    K - the type of keys
    V - the type of values
    All Implemented Interfaces:
    KeyValue<K,​V>
    Direct Known Subclasses:
    AbstractMapEntry, DefaultKeyValue

    public abstract class AbstractKeyValue<K,​V>
    extends java.lang.Object
    implements KeyValue<K,​V>
    Abstract pair class to assist with creating KeyValue and Map.Entry implementations.
    Since:
    3.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      K getKey()
      Gets the key from the pair.
      V getValue()
      Gets the value from the pair.
      java.lang.String toString()
      Gets a debugging String view of the pair.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getKey

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

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

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