K
- the type of keys maintained by this mapV
- the type of mapped valuespublic class LRUMap<K,V>
extends java.util.LinkedHashMap<K,V>
Modifier and Type | Field and Description |
---|---|
private int |
limit |
private static long |
serialVersionUID |
Constructor and Description |
---|
LRUMap(int initialCapacity,
int limit)
Constructs an empty map which may contain at most the given amount of
entries.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
removeEldestEntry(java.util.Map.Entry<K,V> eldest) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
private static final long serialVersionUID
private final int limit