UnmodifiableCollective<E>.bind constructor

UnmodifiableCollective<E>.bind(
  1. Collective<E> bind, {
  2. bool unmodifiableElement = true,
})

Implementation

factory UnmodifiableCollective.bind(Collective<E> bind, {bool unmodifiableElement = true}) {
  return _UnmodifiableCollective<E>(
      properties: ((bind as CollectiveCell)._properties as CollectiveCellProperties).copy(bind: bind) as CollectiveProperties<E>,
      unmodifiableElement: unmodifiableElement,
      elements: unmodifiableElement ? bind.map<E>((e) => e is Cell ? e.unmodifiable as E : e) : bind
  );
}