public class LruCache<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
static <K,V> LruCache<K,V> |
create() |
static <K,V> LruCache<K,V> |
create(int maxCapacity) |
V |
get(Object key) |
int |
getMaxCapacity() |
V |
put(K key,
V value) |
V |
remove(Object key) |
protected boolean |
removeEldestEntry(Map.Entry<K,V> eldest) |
void |
setMaxCapacity(int maxCapacity) |
int |
size() |
containsValue, entrySet, forEach, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putAll, putIfAbsent, remove, replace, replaceequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replacepublic static <K,V> LruCache<K,V> create()
public static <K,V> LruCache<K,V> create(int maxCapacity)
protected boolean removeEldestEntry(Map.Entry<K,V> eldest)
removeEldestEntry in class LinkedHashMap<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class HashMap<K,V>public int size()
public void clear()
public int getMaxCapacity()
public void setMaxCapacity(int maxCapacity)
Copyright © 2025. All rights reserved.