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 head = _head;
  while (head != null) {
    action(head.key, head.value);
    head = head.next;
  }
}