public interface Cache<K,V>
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the entire cache.
|
void |
clearKey(K key)
Clears a specific entry in the cache.
|
V |
get(K key)
Retrieve a value from the cache.
|
Set<K> |
keySet()
Returns all the keys contained in this cache.
|
void |
put(K key,
V value)
Insert a new value into the cache.
|
int |
size() |
void put(K key, V value)
Insert a new value into the cache.
key
- the key of the new entry.value
- the value to be cached.V get(K key)
Retrieve a value from the cache.
key
- the key of the value to be retrieved.void clear()
Clear the entire cache.
void clearKey(K key)
Clears a specific entry in the cache.
key
- the key of the entry to be cleared.Set<K> keySet()
Returns all the keys contained in this cache.
int size()
Copyright © 2013-2015 Dandelion Project. All Rights Reserved.