Class VectorClusterGroupCollection

A generic array based collection. Implements the Symbol.iterator (e.g. [...collection])

Hierarchy (view full)

Accessors

  • get uniqueKey(): undefined | keyof T
  • The key by which to check uniqueness against. undefined if no uniqueness constraint is set.

    Returns undefined | keyof T

Constructors

Methods

  • Protected

    internal remove function, to remove an item from the collection, does not raise an event.

    Parameters

    Returns number

    returns the index of the removed item or -1 if the item has not been found.

  • Returns true, if the key exists. Returns undefined, if there is no uniqueness constraint.

    Parameters

    • value: unknown

    Returns undefined | boolean

  • Creates a Collection from an iterable, such as an Array.

    Type Parameters

    • F

    Parameters

    • iterable: Iterable<F, any, any>
    • OptionaluniqueKey: false | keyof F

      a key to maintain uniquely within the collection. passing false disables uniqueness.

    Returns Collection<F>

Properties

Event raised if an item is added. Is passed the added item.

Event raised if an item is removed. Is passed the removed item.