K - The key.V - The value.public final class LruCache<K,V> extends Object implements Map<K,V>
This cache is keeps a maximal number of items in memory and removes the least-recently-used item, when new items are added.
| Constructor and Description |
|---|
LruCache(int maxEntries) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllCopyright © 2014–2016 XMPP.rocks. All rights reserved.