Interface Map.Pair<K,V>

Type Parameters:
K - type of MapKernel domain (key) entries
V - type of MapKernel range (associated value) entries
All Known Implementing Classes:
MapSecondary.SimplePair
Enclosing interface:
Map<K,V>

public static interface Map.Pair<K,V>
A map entry (key-value pair). The only ways to obtain a reference to a map entry are from the iterator and Map's remove and removeAny methods.
Mathematical Model (abstract value and abstract invariant of this):
type Pair is modeled by (key: K, value: V)
Constructor(s) (initial abstract value(s) of this):
(K key, V value):
 ensures
  this = (key, value)
  • Method Summary

    Modifier and Type
    Method
    Description
    key()
    Returns this Pair's key.
    Returns this Pair's value.
  • Method Details

    • key

      K key()
      Returns this Pair's key.
      Returns:
      the key
      Aliases:
      reference returned by key
    • value

      V value()
      Returns this Pair's value.
      Returns:
      the value
      Aliases:
      reference returned by value