treecalc.rt
Class LruCache<Key,Value>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<Key,Value>
              extended by 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 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
LruCache(int maxEntries, float loadFactor)
           
 
Method Summary
 Value get(java.lang.Object key)
           
protected  boolean removeEldestEntry(java.util.Map.Entry<Key,Value> eldest)
           
 java.lang.String toString()
           
 
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
 

Constructor Detail

LruCache

public LruCache(int maxEntries,
                float loadFactor)
Method Detail

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.