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 voidclear()booleancontainsKey(A key)booleancontainsValue(B value)Set<Map.Entry<A,B>>entrySet()Bget(A key)booleanisEmpty()Bput(A key, B value)voidputAll(Map<? extends A,? extends B> m)Bremove(A key)
-