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
Parameter | Type |
---|---|
entries | Iterable <[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
Parameter | Type |
---|---|
limit | number |
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
Parameter | Type |
---|---|
limit | number |
entries | Iterable <[K , V ]> |
Returns
LRUMap
<K
, V
>
Properties
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
Parameter | Type |
---|---|
limit | number |
entries | undefined | 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
Parameter | Type |
---|---|
entry | Entry <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
Parameter | Type |
---|---|
entries | Iterable <[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
Parameter | Type |
---|---|
key | K |
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
Parameter | Type |
---|---|
key | K |
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
Parameter | Type |
---|---|
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
Parameter | Type |
---|---|
key | K |
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
Parameter | Type |
---|---|
key | K |
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
Parameter | Type |
---|---|
callback | (entry ) => void |
Returns
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
Parameter | Type |
---|---|
key | K |
value | V |
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
>