public class Memoizer<K,V> extends java.lang.Object implements Computable<K,V>
Constructor and Description |
---|
Memoizer(Computable<K,V> c)
Constructs a new
Memoizer with the specified cache source. |
Modifier and Type | Method and Description |
---|---|
V |
compute(K key) |
java.util.concurrent.ConcurrentMap<K,java.util.concurrent.Future<V>> |
getCache() |
public Memoizer(Computable<K,V> c)
Memoizer
with the specified cache source.c
- is the cache value source algorithmjava.lang.NullPointerException
- if c is null