forEach method

  1. @override
void forEach(
  1. void f(
    1. String key,
    2. V value
    )
)
inherited

Applies f to each key/value pair of the TTMultiMap

Calling f must not add or remove keys from the TTMultiMap.

Implementation

@override
void forEach(void Function(String key, V value) f) {
  ArgumentError.checkNotNull(f, 'f');
  final keyItr = keys.iterator as InOrderKeyIterator<V>;

  while (keyItr.moveNext()) {
    for (final value in keyItr.currentValue) {
      f(keyItr.currentKey, value);
    }
  }
}