Set$Typings<T> extension
- on
-
- Set<
T>
- Set<
Properties
- count ↔ num
-
Available on Set<
This read-only property is the number of elements in the Set.T> , provided by the Set$Typings extensiongetter/setter pair -
iterator
↔ Iterator<
T> -
Available on Set<
Gets an object that you can use for iterating over the Set. The value will be a member of the Set. Typical usage:T> , provided by the Set$Typings extensiongetter/setter pair - size ↔ num
-
Available on Set<
This read-only property is the number of elements in the Set.T> , provided by the Set$Typings extensiongetter/setter pair
Methods
-
add(
T val) → Set< T> -
Available on Set<
Adds a given value to the Set, if not already present.T> , provided by the Set$Typings extension -
addAll(
Object coll) → Set< T> -
Available on Set<
Adds all of the values of a collection to this Set.T> , provided by the Set$Typings extension -
all(
bool pred(T)) → bool -
Available on Set<
This is true if all invocations of the given predicate on items in the collection are true.T> , provided by the Set$Typings extension -
any(
bool pred(T)) → bool -
Available on Set<
This is true if any invocation of the given predicate on items in the collection is true.T> , provided by the Set$Typings extension -
clear(
) → void -
Available on Set<
Clears the Set. This sets the #count to zero.T> , provided by the Set$Typings extension -
contains(
T val) → bool -
Available on Set<
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.T> , provided by the Set$Typings extension -
containsAll(
Iterable< T> coll) → bool -
Available on Set<
Returns true if all of the values of a given collection are in this Set. @param {Iterable.T> , provided by the Set$Typings extension -
containsAny(
Iterable< T> coll) → bool -
Available on Set<
Returns true if any of the values of a given collection are in this Set. @param {Iterable.T> , provided by the Set$Typings extension -
copy(
) → Set< T> -
Available on Set<
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.T> , provided by the Set$Typings extension -
delete(
T val) → bool -
Available on Set<
Removes a value (if found) from the Set.T> , provided by the Set$Typings extension -
each(
void func(T)) → Set< T> -
Available on Set<
Call the given function on each item in the collection. @expose @param {function(T)} func This function must not modify the collection. @return {Set.T> , provided by the Set$Typings extension -
filter(
bool pred(T)) → Set< T> -
Available on Set<
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.T> , provided by the Set$Typings extension -
first(
) → T? -
Available on Set<
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.T> , provided by the Set$Typings extension -
has(
T val) → bool -
Available on Set<
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.T> , provided by the Set$Typings extension -
map<
S> (S func(T)) → Set< S> -
Available on Set<
Call the given function on each item in the collection and collect the results in a new Set.T> , provided by the Set$Typings extension -
remove(
T val) → bool -
Available on Set<
Removes a value (if found) from the Set.T> , provided by the Set$Typings extension -
removeAll(
Object coll) → Set< T> -
Available on Set<
Removes all of the values of a collection from this Set.T> , provided by the Set$Typings extension -
retainAll(
Iterable< T> coll) → Set<T> -
Available on Set<
Removes from this Set all items that are not in the given collection.T> , provided by the Set$Typings extension -
toArray(
) → Array< T> -
Available on Set<
Produces a JavaScript Array from the contents of this Set. @return {Array.T> , provided by the Set$Typings extension -
toList(
) → List< T> -
Available on Set<
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.T> , provided by the Set$Typings extension -
toString$(
) → String -
Available on Set<
@return {string}T> , provided by the Set$Typings extension