forEachKey method

  1. @override
void forEachKey(
  1. void f(
    1. String key,
    2. List<V> values
    )
)

Applies f to each key/value pair of the TTMultiMap where key matches specified key.

Calling f must not add or remove keys from the TTMultiMap

Implementation

@override
void forEachKey(void Function(String key, List<V> values) f) {
  ArgumentError.checkNotNull(f, 'f');
  final keyItr = keys.iterator as InOrderKeyIterator<V>;
  while (keyItr.moveNext()) {
    f(keyItr.currentKey, keyItr.currentValue as List<V>);
  }
}