addMap method

IMapOfSets<K, V> addMap(
  1. Map<K, Set<V>> map
)

Adds all set values to this map.

For each key that is already in this map, its resulting set will contain the values of the original map, plus the ones of the other map.

For example: if map = {"a": {1, 2}}, then map.addAll({"a": {3}, "b": {4}}) will result in {"a": {1, 2, 3}, "b": {4}}.

The operation is equivalent to doing addValues for each key:set in map.

Implementation

IMapOfSets<K, V> addMap(Map<K, Set<V>> map) {
  return addEntries(map.entries);
}