toggle menu
mapsglmaps
androidJvm
switch theme
search in API
mapsglmaps
/
com.xweather.mapsgl.utils
/
LRUCache
LRUCache
class
LRUCache
<
String
,
V
>
(
var
capacity
:
Int
,
val
ttl
:
Long
,
val
onRemove
:
(
key
:
String
,
value
:
V
)
->
Unit
?
)
:
MutableMap
<
String
,
V
>
Members
Constructors
LRUCache
Link copied to clipboard
constructor
(
capacity
:
Int
,
ttl
:
Long
,
onRemove
:
(
key
:
String
,
value
:
V
)
->
Unit
?
)
Properties
cache
Link copied to clipboard
val
cache
:
Map
<
String
,
LinkedListNode
<
Entry
<
String
,
V
>
>
>
capacity
Link copied to clipboard
var
capacity
:
Int
entries
Link copied to clipboard
open
override
val
entries
:
MutableSet
<
MutableMap.MutableEntry
<
String
,
V
>
>
first
Link copied to clipboard
val
first
:
V
?
keys
Link copied to clipboard
open
override
val
keys
:
MutableSet
<
String
>
last
Link copied to clipboard
val
last
:
V
?
on
Remove
Link copied to clipboard
val
onRemove
:
(
key
:
String
,
value
:
V
)
->
Unit
?
size
Link copied to clipboard
open
override
val
size
:
Int
ttl
Link copied to clipboard
val
ttl
:
Long
values
Link copied to clipboard
open
override
val
values
:
MutableCollection
<
V
>
Functions
clear
Link copied to clipboard
open
override
fun
clear
(
)
compute
Link copied to clipboard
open
fun
compute
(
p0
:
String
,
p1
:
BiFunction
<
in
String
,
in
V
?
,
out
V
?
>
)
:
V
?
compute
If
Absent
Link copied to clipboard
open
fun
computeIfAbsent
(
p0
:
String
,
p1
:
Function
<
in
String
,
out
V
>
)
:
V
compute
If
Present
Link copied to clipboard
open
fun
computeIfPresent
(
p0
:
String
,
p1
:
BiFunction
<
in
String
,
in
V
&
Any
,
out
V
?
>
)
:
V
?
contains
Key
Link copied to clipboard
open
override
fun
containsKey
(
key
:
String
)
:
Boolean
contains
Value
Link copied to clipboard
open
override
fun
containsValue
(
value
:
V
)
:
Boolean
delete
Link copied to clipboard
fun
delete
(
key
:
String
)
:
V
?
entries
Link copied to clipboard
fun
entries
(
)
:
Sequence
<
Pair
<
String
,
V
>
>
for
Each
Link copied to clipboard
fun
forEach
(
fn
:
(
entry
:
Entry
<
String
,
V
>
)
->
Unit
)
open
fun
forEach
(
p0
:
BiConsumer
<
in
String
,
in
V
>
)
get
Link copied to clipboard
open
operator override
fun
get
(
key
:
String
)
:
V
?
get
Or
Default
Link copied to clipboard
open
fun
getOrDefault
(
key
:
String
,
defaultValue
:
V
)
:
V
has
Link copied to clipboard
fun
has
(
key
:
String
)
:
Boolean
is
Empty
Link copied to clipboard
open
override
fun
isEmpty
(
)
:
Boolean
keys
Link copied to clipboard
fun
keys
(
)
:
Sequence
<
String
>
merge
Link copied to clipboard
open
fun
merge
(
p0
:
String
,
p1
:
V
&
Any
,
p2
:
BiFunction
<
in
V
&
Any
,
in
V
&
Any
,
out
V
?
>
)
:
V
?
peek
Link copied to clipboard
fun
peek
(
key
:
String
)
:
V
?
put
Link copied to clipboard
open
override
fun
put
(
key
:
String
,
value
:
V
)
:
V
?
put
All
Link copied to clipboard
open
override
fun
putAll
(
from
:
Map
<
out
String
,
V
>
)
put
If
Absent
Link copied to clipboard
open
fun
putIfAbsent
(
p0
:
String
,
p1
:
V
)
:
V
?
remove
Link copied to clipboard
open
override
fun
remove
(
key
:
String
)
:
V
?
open
fun
remove
(
key
:
String
,
value
:
V
)
:
Boolean
replace
Link copied to clipboard
open
fun
replace
(
p0
:
String
,
p1
:
V
)
:
V
?
open
fun
replace
(
p0
:
String
,
p1
:
V
,
p2
:
V
)
:
Boolean
replace
All
Link copied to clipboard
open
fun
replaceAll
(
p0
:
BiFunction
<
in
String
,
in
V
,
out
V
>
)
set
Link copied to clipboard
operator
fun
set
(
key
:
String
,
value
:
V
)
values
Link copied to clipboard
fun
values
(
)
:
Sequence
<
V
>