treecalc.rt
Class LruCache<Key,Value>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<Key,Value>
treecalc.rt.LruCache<Key,Value>
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<Key,Value>
public final class LruCache<Key,Value>
- extends java.util.LinkedHashMap<Key,Value>
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary |
LruCache(int maxEntries,
float loadFactor)
|
Methods inherited from class java.util.LinkedHashMap |
clear, containsValue |
Methods inherited from class java.util.HashMap |
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
LruCache
public LruCache(int maxEntries,
float loadFactor)
get
public Value get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map<Key,Value>
- Overrides:
get
in class java.util.LinkedHashMap<Key,Value>
removeEldestEntry
protected boolean removeEldestEntry(java.util.Map.Entry<Key,Value> eldest)
- Overrides:
removeEldestEntry
in class java.util.LinkedHashMap<Key,Value>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.util.AbstractMap<Key,Value>
Copyright © 2013. All Rights Reserved.