Interface JavaSet<T>

A Java Set.

Type Parameters

  • T

Hierarchy

  • JavaSet

Properties

size: number

Number of elements in this Set.

Methods

  • Add the item to this Set.

    This is an optional operation and may fail if this Set is immutable.

    Returns

    true if the item did not yet exist in this Set and was added, false otherwise.

    Parameters

    • item: T

      to add

    Returns boolean

  • Add all items to this Set.

    This is an optional operation and may fail if this Set is immutable.

    Returns

    true if this Set changed as a result of this call, false otherwise.

    Parameters

    • items: any

      a Java Collection or Javascript array.

    Returns boolean

  • Remove all elements from this Set.

    This is an optional operation and may fail if this Set is immutable.

    Returns void

  • Returns

    true if this Set contains the item, false otherwise.

    Parameters

    • item: any

      to check

    Returns boolean

  • Returns

    true if this Set contains all items of the given collection, false otherwise.

    Parameters

    • items: any

      a Java Collection or Javascript array.

    Returns boolean

  • Returns

    true if this Set is empty, false otherwise.

    Returns boolean

  • Remove the given item from this Set.

    This is an optional operation and may fail if this Set is immutable.

    Returns

    true if the item was removed from this Set, false otherwise.

    Parameters

    • item: any

      to remove

    Returns boolean

  • Remove the given items from this Set.

    This is an optional operation and may fail if this Set is immutable.

    Returns

    true if this Set changed as a result of this call, false otherwise.

    Parameters

    • items: any

      a Java Collection or Javascript array.

    Returns boolean

  • Retain only the items in this Set that are contained in the specified collection.

    This is an optional operation and may fail if this Set is immutable.

    Returns

    true if this Set changed as a result of this call, false otherwise.

    Parameters

    • items: any

      a Java Collection or Javascript array.

    Returns boolean