SetMultimap<K, V>.of constructor

SetMultimap<K, V>.of(
  1. Multimap<K, V, Iterable<V>> other, {
  2. Map<K, Set<V>>? map,
  3. Factory<Set<V>>? factory,
})

Creates a SetMultimap with the same keys and values as other.

Implementation

factory SetMultimap.of(Multimap<K, V, Iterable<V>> other,
    {Map<K, Set<V>>? map, Factory<Set<V>>? factory}) {
  final result = SetMultimap<K, V>(map: map, factory: factory);
  other.forEach(result.add);
  return result;
}