Skip to main content

API Reference

Classes

MutSet

Mutable Set.

Methods

NameDescription
add
Add value to set.
clear
The clear() method removes all elements from a set.
copy
Create an immutable shallow copy of this set.
delete
Removes a specified value from a set, if it is in the set.
has
Returns a boolean indicating whether an element with the specified value exists in the set.
toArray
Create an immutable array shallow copy of this set.

add
add(value: <T>): MutSet

Add value to set.

valueRequired

value to add.


clear
clear(): void

The clear() method removes all elements from a set.

copy
copy(): Set

Create an immutable shallow copy of this set.

delete
delete(value: <T>): bool

Removes a specified value from a set, if it is in the set.

valueRequired

The value to remove from the set.


has
has(value: <T>): bool

Returns a boolean indicating whether an element with the specified value exists in the set.

valueRequired

The value to test for presence in the Set object.


toArray
toArray(): Array

Create an immutable array shallow copy of this set.

Properties

NameTypeDescription
size
numThe length of the set.

sizeRequired
size: num;
  • Type: num

The length of the set.


Set

Immutable Set.

Methods

NameDescription
copyMut
Create a mutable shallow copy of this set.
has
Returns a boolean indicating whether an element with the specified value exists in the set.
toArray
Create an immutable array shallow copy of this set.

copyMut
copyMut(): MutSet

Create a mutable shallow copy of this set.

has
has(value: <T>): bool

Returns a boolean indicating whether an element with the specified value exists in the set.

valueRequired

The value to test for presence in the Set object.


toArray
toArray(): Array

Create an immutable array shallow copy of this set.

Properties

NameTypeDescription
size
numThe length of the set.

sizeRequired
size: num;
  • Type: num

The length of the set.