Interface KeyValue<K,​V>

  • Type Parameters:
    K - the key type
    V - the value type

    public interface KeyValue<K,​V>
    Defines a simple key-value pair. The difference between this interface and Map.Entry is that this interface doesn't specify Object.equals(java.lang.Object) and Object.hashCode() and whether they should depend on key's and value's equivalence and hash codes at all. KeyValue also doesn't have an equivalent of Map.Entry's setValue() method.
    • Method Detail

      • getKey

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

        V getValue()
        Gets the value of the pair.
        Returns:
        the value