Options
All
  • Public
  • Public/Protected
  • All
Menu

Sorted set implementation with standard ES6 Set API, customizable value equality and comparison semantics and additional functionality:

Furthermore, this class implements the {@link @thi.ng/api#ICopy}, IEmpty`, {@link @thi.ng/api#ICompare} and {@link @thi.ng/api#IEquiv} interfaces defined by {@link @thi.ng/api# | @thi.ng/api}. The latter two allow instances to be used as keys themselves in other data types defined in this (and other) package(s).

This set uses a SortedMap as backing store and therefore has the same resizing characteristics.

Type parameters

  • T

Hierarchy

  • Set<T>
    • SortedSet

Implements

Index

Constructors

constructor

Properties

Static Set

Set: SetConstructor

Accessors

[Symbol.species]

[Symbol.toStringTag]

  • get [Symbol.toStringTag](): string

size

  • get size(): number

Methods

$reduce

  • $reduce(rfn: ReductionFn<any, T>, acc: any): any

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<T>

add

  • add(key: T): this

clear

  • clear(): void

compare

  • compare(o: Set<T>): number

copy

delete

  • delete(key: T): boolean

disj

  • disj(keys: Iterable<T>): this

empty

entries

  • entries(key?: T, max?: boolean): IterableIterator<Pair<T, T>>

equiv

  • equiv(o: any): boolean

first

  • first(): T

forEach

  • forEach(fn: Fn3<Readonly<T>, Readonly<T>, Set<T>, void>, thisArg?: any): void

get

  • get(key: T, notFound?: T): T | undefined

has

  • has(key: T): boolean

into

  • into(keys: Iterable<T>): this

keys

  • keys(key?: T, max?: boolean): IterableIterator<T>

opts

values

  • values(key?: T, max?: boolean): IterableIterator<T>

Generated using TypeDoc