@univerjscoreclassesLrumap

@univerjs/core v0.5.4


Class: LRUMap<K, V>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:113

Type Parameters

Type Parameter
K
V

Constructors

new LRUMap()

new LRUMap<K, V>(entries): LRUMap<K, V>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:136

Parameters

ParameterType
entriesIterable<[K, V]>

Returns

LRUMap<K, V>

new LRUMap()

new LRUMap<K, V>(limit): LRUMap<K, V>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:137

Parameters

ParameterType
limitnumber

Returns

LRUMap<K, V>

new LRUMap()

new LRUMap<K, V>(limit, entries): LRUMap<K, V>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:138

Parameters

ParameterType
limitnumber
entriesIterable<[K, V]>

Returns

LRUMap<K, V>

Properties

PropertyTypeDefault valueDefined in
limitnumberundefinedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:118
newestundefined | Entry<K, V>undefinedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:122
oldestundefined | Entry<K, V>undefinedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:120
sizenumber0packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:116

Methods

_initialize()

_initialize(limit, entries): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:160

Parameters

ParameterType
limitnumber
entriesundefined | Iterable<[K, V]>

Returns

void


_markEntryAsUsed()

_markEntryAsUsed(entry): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:175

Parameters

ParameterType
entryEntry<K, V>

Returns

void


[iterator]()

iterator: Iterator<[K, V], undefined | [K, V]>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:345

Returns

Iterator<[K, V], undefined | [K, V]>


assign()

assign(entries): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:201

Parameters

ParameterType
entriesIterable<[K, V]>

Returns

void


clear()

clear(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:325

Returns

void


delete()

delete(key): undefined | V

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:298

Parameters

ParameterType
keyK

Returns

undefined | V


entries()

entries(): Iterator<[K, V], undefined | [K, V]>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:341

Returns

Iterator<[K, V], undefined | [K, V]>


find()

find(key): undefined | V

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:293

Parameters

ParameterType
keyK

Returns

undefined | V


forEach()

forEach(fun, thisObj?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:349

Parameters

ParameterType
fun(value, key, m) => void
thisObj?any

Returns

void


get()

get(key): undefined | V

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:280

Parameters

ParameterType
keyK

Returns

undefined | V


has()

has(key): boolean

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:289

Parameters

ParameterType
keyK

Returns

boolean


keys()

keys(): Iterator<K, undefined | K>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:333

Returns

Iterator<K, undefined | K>


onShift()

onShift(callback): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:126

Parameters

ParameterType
callback(entry) => void

Returns

IDisposable


set()

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

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:224

Parameters

ParameterType
keyK
valueV

Returns

LRUMap<K, V>


shift()

shift(): undefined | [K, V]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:257

Returns

undefined | [K, V]


toJSON()

toJSON(): {
  key: K;
  value: V;
 }[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:360

Returns

{ key: K; value: V; }[]


toString()

toString(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:371

Returns

string


values()

values(): Iterator<V, undefined | V>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:337

Returns

Iterator<V, undefined | V>