UnmodifiableCollectiveQueue<E>.bind constructor
UnmodifiableCollectiveQueue<E>.bind (
- Collective bind, {
- bool unmodifiableElement = true,
- CollectiveQueueProperties<
E> ? properties, - Iterable<
E> ? elements,
Creates an unmodifiable queue by binding to an existing Collective.
Parameters:
bind
: The queue to make unmodifiableunmodifiableElement
: If true, elements that are cells will be converted to their unmodifiable versionsproperties
: Optional properties to configure the queueelements
: Optional elements to use instead of the bound queue's elements
Implementation
UnmodifiableCollectiveQueue.bind(Collective bind, {bool unmodifiableElement = true, CollectiveQueueProperties<E>? properties, Iterable<E>? elements})
: super(properties ?? CollectiveQueueProperties<E>(), unmodifiableElement: unmodifiableElement,
elements: elements ?? (unmodifiableElement ? bind.whereType<E>() : bind.whereType<E>().map<E>((e) => e is Cell ? e.unmodifiable as E : e))
);