UnmodifiableCollectiveSet<E>.bind constructor
UnmodifiableCollectiveSet<E>.bind (
- Collective bind, {
- bool unmodifiableElement = true,
- CollectiveSetProperties<
E> ? properties, - Iterable<
E> ? elements,
Creates an unmodifiable wrapper around an existing CollectiveSet.
Parameters:
bind
: The set to make unmodifiableunmodifiableElement
: If true, makes elements unmodifiable when they're Cellsproperties
: Optional custom propertieselements
: Optional override elements
Implementation
UnmodifiableCollectiveSet.bind(Collective bind, {bool unmodifiableElement = true, CollectiveSetProperties<E>? properties, Iterable<E>? elements})
: super(properties ?? CollectiveSetProperties<E>(), unmodifiableElement: unmodifiableElement,
elements: elements ?? (unmodifiableElement ? bind.whereType<E>() : bind.whereType<E>().map<E>((e) => e is Cell ? e.unmodifiable as E : e))
);