# Set
A set of unique generic values.
The Set API is very similar to JavaScript's (MDN (opens new window)), but iterators are not implemented yet.
# Constructor
- Constructs a new set of unique value of type
new Set<T>()
T
.
# Instance members
# Fields
- The current number of unique values in the set.
readonly size: i32
# Methods
function add(value: T): void
Adds the specified value to the set. Does nothing if the value already exists.
function delete(value: T): bool
Deletes the specified value. Returns
true
if the value was found, otherwisefalse
.function clear(): void
Clears the set, deleting all values.
function has(value: T): bool
Tests if the specified value exists in the set.
function values(): Array<T>
Gets the values contained in this set as an array, in insertion order. This is preliminary while iterators are not supported.
function toString(): string
Returns a string representation of this set.
← process StaticArray →