ch.bind.philib.cache
public interface Cache<K,V>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CAPACITY
The default capacity of an object cache.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
static final int DEFAULT_CAPACITY
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()
Copyright © 2013. All Rights Reserved.