org.naokishibata.generic
Class LRUMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
org.naokishibata.generic.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.HashMap<K,V>
- 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 |
LRUMap(int capacity)
|
Methods inherited from class java.util.HashMap |
clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, size, values |
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 |
equals, hashCode |
LRUMap
public LRUMap(int capacity)
clear
public void clear()
- Specified by:
clear
in interface java.util.Map<K,V>
- Overrides:
clear
in class java.util.HashMap<K,V>
setCapacity
public void setCapacity(int c)
renewKey
public void renewKey(K key)
renewValue
public void renewValue(V val)
put
public V put(K key,
V value)
- Specified by:
put
in interface java.util.Map<K,V>
- Overrides:
put
in class java.util.HashMap<K,V>
putAll
public void putAll(java.util.Map<? extends K,? extends V> m)
- Specified by:
putAll
in interface java.util.Map<K,V>
- Overrides:
putAll
in class java.util.HashMap<K,V>
remove
public V remove(java.lang.Object key)
- Specified by:
remove
in interface java.util.Map<K,V>
- Overrides:
remove
in class java.util.HashMap<K,V>