| Constructor and Description |
|---|
Cache1() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(K key)
Does the cache contain the key?
|
V |
get(K key)
Get from cache - or return null.
|
boolean |
isEmpty() |
Iterator<K> |
keys()
Iterate over all keys.
|
V |
put(K key,
V thing)
Insert into from cache and return old value (or null if none)
|
boolean |
remove(K key)
Remove from cache - return true if key referenced an entry
|
void |
setDropHandler(ActionKeyValue<K,V> dropHandler)
Register a callback - called when an object is dropped from the cache (optional operation)
|
long |
size()
Current size of cache
|
public boolean containsKey(K key)
CachecontainsKey in interface Cache<K,V>public V get(K key)
Cachepublic Iterator<K> keys()
Cachepublic V put(K key, V thing)
Cachepublic boolean remove(K key)
Cachepublic void setDropHandler(ActionKeyValue<K,V> dropHandler)
CachesetDropHandler in interface Cache<K,V>Licenced under the Apache License, Version 2.0