K
- Key typeV
- Value typepublic abstract class LRU<K,V> extends Object
Constructor and Description |
---|
LRU() |
Modifier and Type | Method and Description |
---|---|
static <K,V> LRU<K,V> |
create()
Create new LRU
|
abstract V |
getIfPresent(Object key)
Returns the value associated with
key in this cache, or null if there is no
cached value for key . |
abstract void |
put(K key,
V value)
Associates
value with key in this cache. |
public abstract V getIfPresent(Object key)
key
in this cache, or null
if there is no
cached value for key
.public abstract void put(K key, V value)
value
with key
in this cache. If the cache previously contained a
value associated with key
, the old value is replaced by value
.public static <K,V> LRU<K,V> create()
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.