ch.bind.philib.cache
DEFAULT_CAPACITY| Constructor and Description |
|---|
LruCache() |
LruCache(Cloner<V> valueCloner) |
LruCache(int capacity) |
LruCache(int capacity,
Cloner<V> valueCloner) |
| 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.
|
public void set(K key, V value)
Cachepublic V get(K key)
Cachepublic void remove(K key)
Cachepublic int capacity()
Copyright © 2014. All Rights Reserved.