Set$Typings<T> extension

on

Properties

count num

Available on Set<T>, provided by the Set$Typings extension

This read-only property is the number of elements in the Set.
getter/setter pair
iterator Iterator<T>

Available on Set<T>, provided by the Set$Typings extension

Gets an object that you can use for iterating over the Set. The value will be a member of the Set. Typical usage:
getter/setter pair
size num

Available on Set<T>, provided by the Set$Typings extension

This read-only property is the number of elements in the Set.
getter/setter pair

Methods

add(T val) Set<T>

Available on Set<T>, provided by the Set$Typings extension

Adds a given value to the Set, if not already present.
addAll(Object coll) Set<T>

Available on Set<T>, provided by the Set$Typings extension

Adds all of the values of a collection to this Set.
all(bool pred(T)) bool

Available on Set<T>, provided by the Set$Typings extension

This is true if all invocations of the given predicate on items in the collection are true.
any(bool pred(T)) bool

Available on Set<T>, provided by the Set$Typings extension

This is true if any invocation of the given predicate on items in the collection is true.
clear() → void

Available on Set<T>, provided by the Set$Typings extension

Clears the Set. This sets the #count to zero.
contains(T val) bool

Available on Set<T>, provided by the Set$Typings extension

Returns whether the given value is in this Set. @param {T} val The value to check. @return {boolean} Whether or not the value is contained within the Set.
containsAll(Iterable<T> coll) bool

Available on Set<T>, provided by the Set$Typings extension

Returns true if all of the values of a given collection are in this Set. @param {Iterable.
containsAny(Iterable<T> coll) bool

Available on Set<T>, provided by the Set$Typings extension

Returns true if any of the values of a given collection are in this Set. @param {Iterable.
copy() Set<T>

Available on Set<T>, provided by the Set$Typings extension

Makes a shallow copy of this Set. The values are not copied, so if they are objects they may continue to be shared with the original Set. @expose @return {Set.
delete(T val) bool

Available on Set<T>, provided by the Set$Typings extension

Removes a value (if found) from the Set.
each(void func(T)) Set<T>

Available on Set<T>, provided by the Set$Typings extension

Call the given function on each item in the collection. @expose @param {function(T)} func This function must not modify the collection. @return {Set.
filter(bool pred(T)) Set<T>

Available on Set<T>, provided by the Set$Typings extension

Call the given predicate on each item in the collection and for each item that it returns true, collect the item in a new Set.
first() → T?

Available on Set<T>, provided by the Set$Typings extension

Returns the first item in the collection, or null if there is none. @return {T|null} This returns null if there are no items in the collection.
has(T val) bool

Available on Set<T>, provided by the Set$Typings extension

Returns whether the given value is in this Set. @param {T} val The value to check. @return {boolean} Whether or not the value is contained within the Set.
map<S>(S func(T)) Set<S>

Available on Set<T>, provided by the Set$Typings extension

Call the given function on each item in the collection and collect the results in a new Set.
remove(T val) bool

Available on Set<T>, provided by the Set$Typings extension

Removes a value (if found) from the Set.
removeAll(Object coll) Set<T>

Available on Set<T>, provided by the Set$Typings extension

Removes all of the values of a collection from this Set.
retainAll(Iterable<T> coll) Set<T>

Available on Set<T>, provided by the Set$Typings extension

Removes from this Set all items that are not in the given collection.
toArray() Array<T>

Available on Set<T>, provided by the Set$Typings extension

Produces a JavaScript Array from the contents of this Set. @return {Array.
toList() List<T>

Available on Set<T>, provided by the Set$Typings extension

Converts the Set to a List. Because there is no ordering within a Set, the values in the List may be in any order. @return {List.
toString$() String

Available on Set<T>, provided by the Set$Typings extension

@return {string}