Class SortedSet<T>

A SortedSet is a set that holds values in order. Any primitive value (and objects that implement Comparable or Ordered interfaces) can be used as values.

See

Template

V

Type Parameters

  • T

Hierarchy

Constructors

Accessors

Methods

Constructors

  • Creates a new SortedSet object.

    Type Parameters

    • T

    Parameters

    • Optional iterable: Iterable<T>

      Initialize the set with entries.

    • Optional compareFn: any

      The compare function to sort keys.

    Returns SortedSet<T>

Accessors

  • get size(): number
  • Returns the total number of elements in the set.

    Returns

    Returns number

Methods

  • Removes the value from the set and returns true if the value was found and removed.

    Returns

    true if the value was found and removed.

    Parameters

    • value: T

    Returns boolean

  • Returns true if the value exists.

    Returns

    true if value is found, otherwise false.

    Parameters

    • value: T

    Returns boolean

Generated using TypeDoc