SortedSet Class
Package: @esfx/collections-sortedset
Declaration
export declare class SortedSet<T> implements Collection<T>
Constructors
constructor(comparer)
Constructs a new instance of the SortedSet
class
Declaration
constructor(comparer?: Comparison<T> | Comparer<T>);
Parameters
- comparer
- Comparison<T> | Comparer<T>
constructor(iterable, comparer)
Constructs a new instance of the SortedSet
class
Declaration
constructor(iterable?: Iterable<T>, comparer?: Comparison<T> | Comparer<T>);
Parameters
- iterable
- Iterable<T>
- comparer
- Comparison<T> | Comparer<T>
Properties
[Collection.size]
Declaration
get [Collection.size](): number;
Property Value
[Symbol.toStringTag]
Declaration
[Symbol.toStringTag]: string;
Property Value
comparer
Declaration
get comparer(): Comparer<T>;
Property Value
Comparer<T>
size
Declaration
get size(): number;
Property Value
Methods
[Collection.add](value)
Declaration
[Collection.add](value: T): void;
Parameters
- value
- T
Returns
void
[Collection.clear]()
Declaration
[Collection.clear](): void;
Returns
void
[Collection.delete](value)
Declaration
[Collection.delete](value: T): boolean;
Parameters
- value
- T
Returns
[Collection.has](value)
Declaration
[Collection.has](value: T): boolean;
Parameters
- value
- T
Returns
[Symbol.iterator]()
Declaration
[Symbol.iterator](): IterableIterator<T>;
Returns
IterableIterator<T>
add(value)
Declaration
add(value: T): this;
Parameters
- value
- T
Returns
this
clear()
Declaration
clear(): void;
Returns
void
delete(value)
Declaration
delete(value: T): boolean;
Parameters
- value
- T
Returns
entries()
Declaration
entries(): Generator<[T, T], void, unknown>;
Returns
Generator<[T, T], void, unknown>
forEach(callback, thisArg)
Declaration
forEach(callback: (value: T, key: T, map: this) => void, thisArg?: unknown): void;
Parameters
- callback
- (value: T, key: T, map: this) => void
- thisArg
- unknown
Returns
void
has(value)
Declaration
has(value: T): boolean;
Parameters
- value
- T
Returns
keys()
Declaration
keys(): IterableIterator<T>;
Returns
IterableIterator<T>
values()
Declaration
values(): IterableIterator<T>;
Returns
IterableIterator<T>