@univerjs/core v0.4.2 • Docs
Class: LRUMap<K, V>
Type Parameters
Type Parameter |
---|
K |
V |
Constructors
new LRUMap()
new LRUMap<K, V>(entries): LRUMap<K, V>
Parameters
Parameter | Type |
---|---|
entries | Iterable <[K , V ]> |
Returns
LRUMap
<K
, V
>
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:136 (opens in a new tab)
new LRUMap()
new LRUMap<K, V>(limit): LRUMap<K, V>
Parameters
Parameter | Type |
---|---|
limit | number |
Returns
LRUMap
<K
, V
>
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:137 (opens in a new tab)
new LRUMap()
new LRUMap<K, V>(limit, entries): LRUMap<K, V>
Parameters
Parameter | Type |
---|---|
limit | number |
entries | Iterable <[K , V ]> |
Returns
LRUMap
<K
, V
>
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:138 (opens in a new tab)
Properties
Property | Type | Default value | Defined in |
---|---|---|---|
limit | number | undefined | submodules/univer/packages/core/src/shared/lru/lru-map.ts:118 (opens in a new tab) |
newest | undefined | Entry <K , V > | undefined | submodules/univer/packages/core/src/shared/lru/lru-map.ts:122 (opens in a new tab) |
oldest | undefined | Entry <K , V > | undefined | submodules/univer/packages/core/src/shared/lru/lru-map.ts:120 (opens in a new tab) |
size | number | 0 | submodules/univer/packages/core/src/shared/lru/lru-map.ts:116 (opens in a new tab) |
Methods
[iterator]()
iterator: Iterator<[K, V], undefined | [K, V], undefined>
Returns
Iterator
<[K
, V
], undefined
| [K
, V
], undefined
>
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:345 (opens in a new tab)
_initialize()
_initialize(limit, entries): void
Parameters
Parameter | Type |
---|---|
limit | number |
entries | undefined | Iterable <[K , V ]> |
Returns
void
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:160 (opens in a new tab)
_markEntryAsUsed()
_markEntryAsUsed(entry): void
Parameters
Parameter | Type |
---|---|
entry | Entry <K , V > |
Returns
void
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:175 (opens in a new tab)
assign()
assign(entries): void
Parameters
Parameter | Type |
---|---|
entries | Iterable <[K , V ]> |
Returns
void
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:201 (opens in a new tab)
clear()
clear(): void
Returns
void
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:325 (opens in a new tab)
delete()
delete(key): undefined | V
Parameters
Parameter | Type |
---|---|
key | K |
Returns
undefined
| V
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:298 (opens in a new tab)
entries()
entries(): Iterator<[K, V], undefined | [K, V], undefined>
Returns
Iterator
<[K
, V
], undefined
| [K
, V
], undefined
>
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:341 (opens in a new tab)
find()
find(key): undefined | V
Parameters
Parameter | Type |
---|---|
key | K |
Returns
undefined
| V
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:293 (opens in a new tab)
forEach()
forEach(fun, thisObj?): void
Parameters
Parameter | Type |
---|---|
fun | (value , key , m ) => void |
thisObj ? | any |
Returns
void
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:349 (opens in a new tab)
get()
get(key): undefined | V
Parameters
Parameter | Type |
---|---|
key | K |
Returns
undefined
| V
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:280 (opens in a new tab)
has()
has(key): boolean
Parameters
Parameter | Type |
---|---|
key | K |
Returns
boolean
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:289 (opens in a new tab)
keys()
keys(): Iterator<K, undefined | K, undefined>
Returns
Iterator
<K
, undefined
| K
, undefined
>
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:333 (opens in a new tab)
onShift()
onShift(callback): IDisposable
Parameters
Parameter | Type |
---|---|
callback | (entry ) => void |
Returns
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:126 (opens in a new tab)
set()
set(key, value): LRUMap<K, V>
Parameters
Parameter | Type |
---|---|
key | K |
value | V |
Returns
LRUMap
<K
, V
>
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:224 (opens in a new tab)
shift()
shift(): undefined | [K, V]
Returns
undefined
| [K
, V
]
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:257 (opens in a new tab)
toJSON()
toJSON(): {
key: K;
value: V;
}[]
Returns
{
key
: K
;
value
: V
;
}[]
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:360 (opens in a new tab)
toString()
toString(): string
Returns
string
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:371 (opens in a new tab)
values()
values(): Iterator<V, undefined | V, undefined>
Returns
Iterator
<V
, undefined
| V
, undefined
>
Defined in
submodules/univer/packages/core/src/shared/lru/lru-map.ts:337 (opens in a new tab)