public class LRUCache<K,V>
extends java.util.LinkedHashMap<K,V>
Constructor and Description |
---|
LRUCache(int initial,
int limit) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
java.lang.Object |
clone() |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
java.util.Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> map) |
V |
remove(java.lang.Object key) |
void |
setCapacity(int size) |
containsValue, forEach, getOrDefault, replaceAll, values
public void setCapacity(int size)
public V get(java.lang.Object key)
public V remove(java.lang.Object key)
public void clear()
public java.util.Set<K> keySet()