Skip to content

Class: OrderMap<K, V>

Type parameters

Name
K
V

Hierarchy

  • Map<K, V>

    OrderMap

Constructors

Properties

Methods

Constructors

constructor

new OrderMap<K, V>(iterable?, recordKey?, recordValue?)

Type parameters

Name
K
V

Parameters

NameType
iterable?Iterable<readonly [K, V]>
recordKey?boolean
recordValue?boolean

Overrides

Map<K, V&gt;.constructor

Defined in

src/math/OrderMap.ts:5

Properties

size

Readonly size: number

Inherited from

Map.size

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.collection.d.ts:46


[toStringTag]

Readonly [toStringTag]: string

Inherited from

Map.[toStringTag]

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:137


[species]

Static Readonly [species]: MapConstructor

Inherited from

Map.[species]

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:319


valueList

Readonly valueList: V[]

Defined in

src/math/OrderMap.ts:2


keyList

Readonly keyList: K[]

Defined in

src/math/OrderMap.ts:3


isChange

isChange: boolean = true

Defined in

src/math/OrderMap.ts:4

Methods

forEach

forEach(callbackfn, thisArg?): void

Executes a provided function once per each key/value pair in the Map, in insertion order.

Parameters

NameType
callbackfn(value: V, key: K, map: Map<K, V>) => void
thisArg?any

Returns

void

Inherited from

Map.forEach

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.collection.d.ts:29


get

get(key): V

Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

Parameters

NameType
keyK

Returns

V

Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

Inherited from

Map.get

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.collection.d.ts:34


has

has(key): boolean

Parameters

NameType
keyK

Returns

boolean

boolean indicating whether an element with the specified key exists or not.

Inherited from

Map.has

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.collection.d.ts:38


[iterator]

[iterator](): IterableIterator<[K, V]>

Returns an iterable of entries in the map.

Returns

IterableIterator<[K, V]>

Inherited from

Map.[iterator]

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts:119


entries

entries(): IterableIterator<[K, V]>

Returns an iterable of key, value pairs for every entry in the map.

Returns

IterableIterator<[K, V]>

Inherited from

Map.entries

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts:124


keys

keys(): IterableIterator<K>

Returns an iterable of keys in the map

Returns

IterableIterator<K>

Inherited from

Map.keys

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts:129


values

values(): IterableIterator<V>

Returns an iterable of values in the map

Returns

IterableIterator<V>

Inherited from

Map.values

Defined in

node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts:134


delete

delete(key): boolean

Parameters

NameType
keyK

Returns

boolean

Overrides

Map.delete

Defined in

src/math/OrderMap.ts:18


set

set(key, value): OrderMap<K, V>

Parameters

NameType
keyK
valueV

Returns

OrderMap<K, V>

Overrides

Map.set

Defined in

src/math/OrderMap.ts:47


clear

clear(): void

Returns

void

Overrides

Map.clear

Defined in

src/math/OrderMap.ts:56