public class Cache<K,V> extends Object implements Computable<K,V>
| Modifier and Type | Class and Description |
|---|---|
static interface |
Cache.CycleHandler<K> |
| Constructor and Description |
|---|
Cache(Computable<K,V> computable)
Create new cache with given computable to compute values.
|
Cache(Computable<K,V> computable,
Cache.CycleHandler<K> cycleHandler)
Create new cache with given computable and cycleHandler.
|
public Cache(Computable<K,V> computable)
computable - public Cache(Computable<K,V> computable, Cache.CycleHandler<K> cycleHandler)
computable - cycleHandler - public V compute(K key)
Computablecompute in interface Computable<K,V>key - input data.public void clear()
public boolean containsKey(K key)
key - public void remove(K key)
key - item key.Copyright © 2009-2013 Oracle Corporation. All Rights Reserved.