Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LocalSet<T>

This is a local implementation of RemoteSet for cases when entries are cannot be scrolled through on the server and must instead be cached on the client.

Type parameters

  • T

Hierarchy

  • LocalSet

Implements

Index

Constructors

constructor

  • new LocalSet(size?: number, iterable?: Iterable<T>): LocalSet
  • Constructs a new LocalSet.

    Parameters

    • Default value size: number = 32
    • Optional iterable: Iterable<T>

    Returns LocalSet

Accessors

size

  • get size(): Promise<number>
  • Returns the number of values in the Set object.

    inheritdoc

    Returns Promise<number>

    the number of values in the Set object

Methods

[Symbol.asyncIterator]

  • [Symbol.asyncIterator](): IterableIterator<T>
  • inheritdoc

    Returns IterableIterator<T>

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<T>

clear

  • clear(): Promise<boolean>
  • Removes all elements from the Set object.

    Returns Promise<boolean>

    a Promise resolving to true if the elements were removed from this set, otherwise resolves to false

delete

  • delete(val: T): Promise<boolean>
  • Removes the specified element from this set if it is present.

    Parameters

    • val: T

      the value to be removed from this set, if present

    Returns Promise<boolean>

    a Promise resolving to true if the elements were removed from this set, otherwise resolves to false

has

  • has(val: T): Promise<boolean>
  • Returns true if this set contains the specified element.

    Parameters

    • val: T

      whose presence in this set is to be tested

    Returns Promise<boolean>

    a Promise resolving to true if set contains the value, or false if not