ISet<T>.withConfig constructor
Create an ISet from any Iterable and a ConfigSet.
Fast, if the Iterable is another ISet.
If iterable
is null, return an empty ISet.
Implementation
factory ISet.withConfig(
Iterable<T>? iterable,
ConfigSet config,
) {
return ((iterable is ISet<T>) && (iterable.isOfExactGenericType(T)))
? (config == iterable.config)
? iterable
: iterable.isEmpty
? ISetImpl.empty<T>(config)
: ISetImpl<T>._(iterable, config: config)
: (iterable == null)
? ISetImpl.empty<T>(config)
: ISetImpl<T>._unsafe(SFlat<T>(iterable, config: config), config: config);
}