Interface ISet<E>

Concurrent and distributed set.

Methods that require serialization/deserialization may throw RangeError, e.g when there is no suitable serializer for a certain type.

Type Parameters

  • E

Hierarchy

Methods

  • Adds the specified element to this set if not already present.

    Returns

    a promise to be resolved to true if this set did not contain the element.

    Parameters

    • entry: E

    Returns Promise<boolean>

  • Adds the elements in the array items to this set if not already present. At the end, the set contains all elements of items array and its previous elements.

    Returns

    true if this set changed, false otherwise.

    Parameters

    • items: E[]

    Returns Promise<boolean>

  • Adds an item listener for this set. Listener will be invoked for any add/remove item events.

    Returns

    Registration id of the listener.

    Parameters

    • listener: ItemListener<E>
    • includeValue: boolean

      true if updated item should be included in the event.

    Returns Promise<string>

  • Removes all of the elements from this set.

    Returns Promise<void>

  • Checks whether this set contains the given element.

    Returns

    true if this set contains the given element, false otherwise.

    Parameters

    • entry: E

    Returns Promise<boolean>

  • Checks whether this set contains all elements of given array.

    Returns

    true if this set contains all elements of given collection, false otherwise.

    Parameters

    • items: E[]

    Returns Promise<boolean>

  • Returns

    true if this set does n Checks if this set has any elements.ot have any elements, false otherwise.

    Returns Promise<boolean>

  • Removes given entry from this set.

    Returns

    true if this set actually had given element, false otherwise.

    Parameters

    • entry: E

    Returns Promise<boolean>

  • Removes all elements of given array from this set.

    Returns

    true if this set changed.

    Parameters

    • items: E[]

    Returns Promise<boolean>

  • Removes an item listener for this set.

    Returns

    true if the item listener is removed, false otherwise.

    Parameters

    • registrationId: string

      Registration id of the listener to be removed.

    Returns Promise<boolean>

  • Removes all elements from this set except the elements of given array.

    Returns

    true if this set changed.

    Parameters

    • items: E[]

    Returns Promise<boolean>

  • Returns the size of this set.

    Returns

    number of elements in this set.

    Returns Promise<number>

  • Returns an array containing all of the elements in the set.

    Returns

    An array of items.

    Returns Promise<E[]>

Generated using TypeDoc