mapKeyValue<K, V> method

Pair mapKeyValue<K, V>(
  1. Comparable key,
  2. dynamic value
)

Maps a key and value to a pair with the desired natural order.

Pairs will be ordered according to their compareTo method, i.e. first on value, then on key.

Implementation

Pair mapKeyValue<K, V>(Comparable key, dynamic value) =>
    Pair(key, mapValue(value));