create<E, I extends Queue<E>> static method

CollectiveQueue<E> create<E, I extends Queue<E>>({
  1. Iterable<E>? elements,
  2. bool unmodifiableElement = true,
  3. Cell? bind,
  4. ContainerType? container,
  5. CollectiveReceptor<dynamic, Signal, Signal> receptor = CollectiveReceptor.unchanged,
  6. TestCollective<dynamic, Collective> test = TestCollective.passed,
  7. MapObject? mapObject,
  8. Synapses<Signal, Cell> synapses = Synapses.enabled,
})
override

Factory constructor to create an unmodifiable queue with configuration options.

Parameters:

  • elements: Initial elements for the queue
  • unmodifiableElement: If true, elements that are cells will be converted to their unmodifiable versions
  • bind: Optional cell to bind to
  • container: Container type configuration
  • receptor: Signal receptor configuration
  • test: Test rules for the queue
  • map: Mapping configuration
  • synapses: Synapses configuration for cell linking

Implementation

static CollectiveQueue<E> create<E, I extends Queue<E>>({
  Iterable<E>? elements,
  bool unmodifiableElement = true,
  Cell? bind,
  ContainerType? container,
  CollectiveReceptor receptor = CollectiveReceptor.unchanged,
  TestCollective test = TestCollective.passed,
  MapObject? mapObject,
  Synapses synapses = Synapses.enabled
}) {
  return UnmodifiableCollectiveQueue<E>.fromProperties(
      CollectiveCellProperties<E,I>(bind: bind, container: container, test: test, receptor: receptor, synapses: synapses),
      unmodifiableElement: unmodifiableElement,
      elements: elements
  );
}