- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<K,V>
-
- scriptella.util.LRUMap<K,V>
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>
public class LRUMap<K,V>
extends java.util.LinkedHashMap<K,V>
Represents LRU Map implementation based on LinkedHashMap.
- Version:
- 1.0
- Author:
- Fyodor Kupolov
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
| Constructor and Description |
LRUMap(int size) |
-
Method Summary
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
Constructor Detail
-
LRUMap
public LRUMap(int size)
-
Method Detail
-
onEldestEntryRemove
protected void onEldestEntryRemove(java.util.Map.Entry<K,V> eldest)
Invoked when eldest entry is about to be removed.
- Parameters:
eldest - eldest entry.
Copyright © 2006-2026 The Scriptella Project Team.
Need help with Scriptella integration, migration, or Java performance? Scriptella consulting by PVR Labs.