- All Implemented Interfaces:
Cache<K,V>
public final class LruCache<K,V>
extends Object
implements Cache<K,V>
-
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
cache
private final Map<K,V> cache
-
Constructor Details
-
LruCache
public LruCache(int maxCapacity)
-
Method Details
-
containsKey
public boolean containsKey(K key)
- Specified by:
containsKey
in interface Cache<K,V>
-
-
put
public void put(K key,
V value)
- Specified by:
put
in interface Cache<K,V>
-