@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
Parameter | Type |
---|---|
entries | Iterable <[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
Parameter | Type |
---|---|
limit | number |
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
Parameter | Type |
---|---|
limit | number |
entries | Iterable <[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
Property | Type | Default value | Defined in |
---|---|---|---|
limit | number | undefined | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:118 |
newest | undefined | Entry <K , V > | undefined | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:122 |
oldest | undefined | Entry <K , V > | undefined | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:120 |
size | number | 0 | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lru/lru-map.ts:116 |
Methods
_initialize()
_initialize(limit, entries): void
Parameters
Parameter | Type |
---|---|
limit | number |
entries | undefined | 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
Parameter | Type |
---|---|
entry | Entry <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
Parameter | Type |
---|---|
entries | Iterable <[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
Parameter | Type |
---|---|
key | K |
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
Parameter | Type |
---|---|
key | K |
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
Parameter | Type |
---|---|
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
Parameter | Type |
---|---|
key | K |
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
Parameter | Type |
---|---|
key | K |
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
Parameter | Type |
---|---|
callback | (entry ) => void |
Returns
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
Parameter | Type |
---|---|
key | K |
value | V |
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