|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache<K,V>
The base interface for a cache implementation.
| Field Summary | |
|---|---|
static int |
DEFAULT_CAPACITY
The default capacity of an object cache. |
| Method Summary | |
|---|---|
int |
capacity()
|
void |
clear()
Remove all elements from the cache. |
V |
get(K key)
Query a value from the cache by its key. |
void |
remove(K key)
Remove a key-value-pair from the cache. |
void |
set(K key,
V value)
Sets a key-value-pair to the cache. |
| Field Detail |
|---|
static final int DEFAULT_CAPACITY
| Method Detail |
|---|
void set(K key,
V value)
IllegalArgumentException - if the key is null.V get(K key)
IllegalArgumentException - if the key is null.void remove(K key)
IllegalArgumentException - if the key is null.int capacity()
void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||