The number of distinct elements in the set.
Iterates over the values in the set in sorted order.
Inserts a value into the set.
The value to insert.
Calculates the minimum would-be index in the sorted set if the value was inserted, or the actual index if the value is already in the set.
Removes all elements from the SortedSet object.
Removes a value from the set and returns a boolean determining whether the removal was successful. (the value was or wasn't in the tree beforehand)
The value to remove
Returns a new iterator object that contains an array of [value, value] for each element in the Set object, in sorted order.
This is similar to the Map
object, so that each entry's key is the same
as its value for a SortedSet
.
Calls callbackfn
once for each value present in the SortedSet
object,
in sorted order. If a thisArg
parameter is provided, it will be used as
the this
value for each invocation of callbackfn
.
Function to execute for each element.
Value to use as this
when executing callbackfn
.
Returns the value at the given index in the sorted order. (0-indexed)
If the index is invalid, returns undefined.
The index to lookup
Determines whether the value is in the set.
Returns a new iterator object that yields the values for each element in
the SortedSet
object in sorted order. (For SortedSets
, this is the same as the
values()
method.)
Returns a new iterator object that yields the values for each element in
the SortedSet
object in sorted order. (For SortedSets
, this is the same as the
keys()
method.)
Generated using TypeDoc
A sorted set.