forEach method

  1. @override
void forEach(
  1. void action(
    1. K key,
    2. V value
    )
)
override

Applies action to each key-value pair of the map in order of MRU to LRU.

Calling action must not add or remove keys from the map.

Implementation

@override
void forEach(void Function(K key, V value) action) {
  var tail = _tail;
  while (tail != null) {
    action(tail.key, tail.value);
    tail = tail.previous;
  }
}