Package es.bsc.dataclay.util.structs
Class LruCache<A,B>
- java.lang.Object
-
- es.bsc.dataclay.util.structs.LruCache<A,B>
-
- Type Parameters:
A
- Key element classB
- Value element class
public class LruCache<A,B> extends Object
Class that implements a simple LRU cache with specified max entries.
-
-
Constructor Summary
Constructors Constructor Description LruCache(int theMaxEntries)
LruCache constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(A key)
boolean
containsValue(B value)
Set<Map.Entry<A,B>>
entrySet()
B
get(A key)
boolean
isEmpty()
B
put(A key, B value)
void
putAll(Map<? extends A,? extends B> m)
B
remove(A key)
-