Class ArraySet<V>

Array-backed set. Trades memory for iteration speed

Type Parameters

  • V

Constructors

Properties

Accessors

Methods

Constructors

Properties

values: readonly V[]

Read-only array of values in the set.

Accessors

Methods

  • Get value at index.

    Parameters

    • index: number

      Index into backing array

    Returns undefined | V

    Value or undefined

  • Delete entry for value v.

    Parameters

    • v: V

      Value

    Returns boolean

    true if an entry was removed

  • Check if a value exists in the set.

    Parameters

    • v: V

      Value

    Returns boolean

    true if value exists