Class DeterministicMap<K, V>
Constructors
constructor
- new DeterministicMap<K, V>(compareFn): DeterministicMap<K, V>
Parameters
- compareFn: ((a: K, b: K) => number)
- (a, b): number
Returns number
Accessors
size
- get size(): number
Returns number
Methods
[iterator]
- [iterator](): IterableIterator<[K, V], any, any>
Returns IterableIterator<[K, V], any, any>
clear
- clear(): void
Returns void
delete
- delete(key): boolean
Returns boolean
forEach
- forEach(callback): void
Parameters
- callback: ((value: V, key: K, map: DeterministicMap<K, V>) => void)
- (value, key, map): void
Returns void
Returns void
get
- get(key): undefined | V
Returns undefined | V
has
- has(key): boolean
Returns boolean
keys
- keys(): IterableIterator<K, any, any>
Returns IterableIterator<K, any, any>
set
- set(key, value): void
Returns void
values
- values(): IterableIterator<V, any, any>
Returns IterableIterator<V, any, any>
Static
fromMap
- fromMap<K, V>(map, compareFn): DeterministicMap<K, V>
Parameters
- map: Map<K, V>
- compareFn: ((a: K, b: K) => number)
- (a, b): number
Returns number