T
- the key typeU
- the value typepublic class LruMap<T,U>
extends java.util.LinkedHashMap<T,U>
Map
.Constructor and Description |
---|
LruMap(int maxEntries)
Creates a new instance with the specified maximum number of allowed entries.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
removeEldestEntry(java.util.Map.Entry<T,U> eldest)
Returns
true if the HashMap.size() of this map exceeds the maximum number of allowed entries. |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size