Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ISet<E>

Type parameters

  • E

Hierarchy

Implemented by

Index

Methods

add

  • add(entry: E): Promise<boolean>
  • Adds the specified element to this set if not already present.

    throws

    {Error} if entry is null or undefined.

    Parameters

    • entry: E

    Returns Promise<boolean>

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

addAll

  • addAll(items: E[]): Promise<boolean>
  • Adds the elements contained in array to this set if not already present. Set contains all elements of items array and its previous elements at the end.

    throws

    {Error} if collection or one of its elements is null or undefined.

    Parameters

    • items: E[]

    Returns Promise<boolean>

    true if this set changed, false otherwise.

addItemListener

  • addItemListener(listener: ItemListener<E>, includeValue: boolean): Promise<string>
  • Adds an item listener for this set. Listener will be invoked for any add/remove item event.

    Parameters

    • listener: ItemListener<E>
    • includeValue: boolean

      true if updated item should be included in the event.

    Returns Promise<string>

    Registration id of the listener.

clear

  • clear(): Promise<void>
  • Removes all of the elements from this set.

    Returns Promise<void>

contains

  • contains(entry: E): Promise<boolean>
  • Checks whether this set contains given element.

    throws

    {Error} if entry is null.

    Parameters

    • entry: E

    Returns Promise<boolean>

    true if this set contains given element, false otherwise.

containsAll

  • containsAll(items: E[]): Promise<boolean>
  • Checks whether this set contains all elements of given array.

    throws

    {Error} if collection or one of its elements is null or undefined.

    Parameters

    • items: E[]

    Returns Promise<boolean>

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

destroy

  • destroy(): Promise<void>

getName

  • getName(): string

getPartitionKey

  • getPartitionKey(): string

getServiceName

  • getServiceName(): string

isEmpty

  • isEmpty(): Promise<boolean>
  • Returns Promise<boolean>

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

remove

  • remove(entry: E): Promise<boolean>
  • Removes given entry from this set.

    throws

    {Error} if entry is null or undefined.

    Parameters

    • entry: E

    Returns Promise<boolean>

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

removeAll

  • removeAll(items: E[]): Promise<boolean>
  • Removes all elements of given array from this set.

    throws

    {Error} if collection or one of its elements is null or undefined.

    Parameters

    • items: E[]

    Returns Promise<boolean>

    true if this set changed.

removeItemListener

  • removeItemListener(registrationId: string): Promise<boolean>
  • Removes an item listener for this set.

    Parameters

    • registrationId: string

      Registration id of the listener to be removed.

    Returns Promise<boolean>

    true if the item listener is removed, false otherwise.

retainAll

  • retainAll(items: E[]): Promise<boolean>
  • Removes all elements from this set except the elements of given array.

    throws

    {Error} if collection or one of its elements is null or undefined.

    Parameters

    • items: E[]

    Returns Promise<boolean>

    true if this set changed.

size

  • size(): Promise<number>
  • Returns the size of this set.

    Returns Promise<number>

    number of elements in this set.

toArray

  • toArray(): Promise<E[]>
  • Returns an array containing all of the elements in the set.

    Returns Promise<E[]>

    An array of items.

Generated using TypeDoc