Internally, XSet
is implemented using composition, as opposed to inheritance.
The number of elements in the set.
Determines whether the provided callback function returns true for every element of the set.
Returns true if the set is empty.
Returns the elements of the set that meet the condition specified in the provided callback function.
Returns the elements of the set that meet the condition specified in the provided callback function.
Returns the elements of the set that meet the condition specified in the provided callback function.
Returns the first element in this set (in insertion order) that satisfies the provided predicate. Returns undefined if none of the elements satisfy the predicate.
Returns the first element in this set (in insertion order) that satisfies the provided predicate. Returns undefined if none of the elements satisfy the predicate.
Returns the first element in this set (in insertion order) that satisfies the provided predicate. Returns undefined if none of the elements satisfy the predicate.
Calls the provided callback function for all the elements in the set. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
The elements are iterated over in insertion order.
Calls the provided callback function for all the elements in the set. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
The elements are iterated over in insertion order.
Determines whether the provided callback function returns true for any element of the set.
Returns false if the set is empty.
Iterates over elements in the set, in insertion order.
Removes all elements from the set.
If the provided value is in the set, deletes the value and returns true. Otherwise, returns false.
Returns an iterable of [v,v]
pairs for every element v
in the set, in insertion order.
Calls the provided callback once for each element in the set, in insertion order.
Determines if the set has the provided value.
Despite its name, returns an iterable of the values (i.e., elements) in the set, in insertion order.
Returns an iterable of elements in the set, in insertion order.
Adds all the elements yielded by the provided iterable to this set.
Returns a new set containing all this set's elements.
Deletes all the elements yielded by the provided iterable from this set.
Returns an array of all the elements in this set, in insertion order.
Returns the set of all [t, u]
for each t
in this
and each u
in other
.
Returns a set of all the elements that are in this
but not in other
.
Determines if this set has exactly the same elements as the provided set.
Returns a set containing all the elements that are both in this
and other
.
Determines if there are zero elements that are both in this set and the provided set.
Determines whether every element of this set is an element of the provided set and the provided set contains at least one element not in this set.
Determines whether every element of the provided set is an element of this set and this set contains at least one element not in the provided set.
Determines whether every element of this set is an element of the provided set.
Determines whether every element of the provided set is an element of this set.
Returns a set containing all the elements that are either in this
or other
.
Returns a set of all the elements that are either only in this
or only in other
.
The returned set will not include elements that are in both sets.
Other libaries call this operation symmetric difference or disjunctive union.
Generated using TypeDoc
An extension of
Set
that provides methods supporting common iterator operations such asmap
andfilter
, as well as common set operations such asunion
andisSubsetOf
.