addValues method
Find the key
/set
entry, and add all the values
to the set
.
If the key
doesn't exist, will first create it with an empty set
,
and then add the values
to it.
Implementation
IMapOfSets<K, V> addValues(K key, Iterable<V> values) {
ISet<V> set = _mapOfSets[key] ?? ISetImpl.empty<V>(config.asConfigSet);
ISet<V> newSet = set.addAll(values);
return set.same(newSet) ? this : replaceSet(key, newSet);
}