@univerjscoreclassesLrumap

@univerjs/core v0.5.0-beta.1 • Docs


Class: LRUMap<K, V>

Type Parameters

Type Parameter
K
V

Constructors

new LRUMap()

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

Parameters

ParameterType
entriesIterable<[K, V], any, any>

Returns

LRUMap<K, V>

Defined in

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

new LRUMap()

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

Parameters

ParameterType
limitnumber

Returns

LRUMap<K, V>

Defined in

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

new LRUMap()

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

Parameters

ParameterType
limitnumber
entriesIterable<[K, V], any, any>

Returns

LRUMap<K, V>

Defined in

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

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

Parameters

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

Returns

void

Defined in

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


_markEntryAsUsed()

_markEntryAsUsed(entry): void

Parameters

ParameterType
entryEntry<K, V>

Returns

void

Defined in

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


[iterator]()

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

Returns

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

Defined in

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


assign()

assign(entries): void

Parameters

ParameterType
entriesIterable<[K, V], any, any>

Returns

void

Defined in

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


clear()

clear(): void

Returns

void

Defined in

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


delete()

delete(key): undefined | V

Parameters

ParameterType
keyK

Returns

undefined | V

Defined in

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


entries()

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

Returns

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

Defined in

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


find()

find(key): undefined | V

Parameters

ParameterType
keyK

Returns

undefined | V

Defined in

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


forEach()

forEach(fun, thisObj?): void

Parameters

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

Returns

void

Defined in

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


get()

get(key): undefined | V

Parameters

ParameterType
keyK

Returns

undefined | V

Defined in

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


has()

has(key): boolean

Parameters

ParameterType
keyK

Returns

boolean

Defined in

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


keys()

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

Returns

Iterator<K, undefined | K, any>

Defined in

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


onShift()

onShift(callback): IDisposable

Parameters

ParameterType
callback(entry) => void

Returns

IDisposable

Defined in

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


set()

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

Parameters

ParameterType
keyK
valueV

Returns

LRUMap<K, V>

Defined in

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


shift()

shift(): undefined | [K, V]

Returns

undefined | [K, V]

Defined in

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


toJSON()

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

Returns

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

Defined in

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


toString()

toString(): string

Returns

string

Defined in

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


values()

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

Returns

Iterator<V, undefined | V, any>

Defined in

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