updateAll method

IMapOfSets<K, V> updateAll(
  1. ISet<V> update(
    1. K key,
    2. ISet<V> set
    )
)

Updates all sets.

Iterates over all key:set entries in the map and updates them with the result of invoking update.

Implementation

IMapOfSets<K, V> updateAll(ISet<V> Function(K key, ISet<V> set) update) {
  bool Function(K key, ISet<V> set)? ifRemove;
  if (config.removeEmptySets) ifRemove = (K key, ISet<V> set) => set.isEmpty;

  return IMapOfSets<K, V>._unsafe(_mapOfSets.updateAll(update, ifRemove: ifRemove), config);
}