IMapOfSets<K, V>.withConfig constructor
IMapOfSets<K, V>.withConfig (
- Map<
K, Iterable< ? mapOfSets,V> > - ConfigMapOfSets config
Create an IMapOfSets from a map of sets and a ConfigMapOfSets.
Implementation
factory IMapOfSets.withConfig(
Map<K, Iterable<V>>? mapOfSets,
ConfigMapOfSets config,
) {
ConfigSet configSet = config.asConfigSet;
ConfigMap configMap = config.asConfigMap;
return (mapOfSets == null)
? empty<K, V>()
: IMapOfSets._unsafe(
IMap.fromIterables(
mapOfSets.keys,
mapOfSets.values.map((value) => ISet.withConfig(value, configSet)),
config: configMap,
),
config,
);
}