K
- the key typeV
- the value typepublic final class LruCache<K,V> extends LinkedHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
LruCache(int maxEntries)
Create an LRU cache with the given max number of entries
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
removeEldestEntry(Map.Entry<K,V> eldest)
Returns true if the size exceeds the max number of entries
|
clear, containsValue, get
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
equals, hashCode, toString
public LruCache(int maxEntries)
maxEntries
- the max number of entriesprotected boolean removeEldestEntry(Map.Entry<K,V> eldest)
removeEldestEntry
in class LinkedHashMap<K,V>
Copyright © 2015 Actian Corporation. All Rights Reserved.