addValuesToKeys method
Add all values
to each set
of all given keys
.
If the key
doesn't exist, it will first create it with an empty set
,
and then add the values
to it.
Implementation
@useCopy
IMapOfSets<K, V> addValuesToKeys(Iterable<K> keys, Iterable<V> values) {
IMapOfSets<K, V> result = this;
for (K key in keys) {
result = result.addValues(key, values);
}
return result;
}