Constructor and Description |
---|
DefaultCache() |
Modifier and Type | Method and Description |
---|---|
V |
get(K key)
Get the value for the specified key, or null when there is no such key.
|
void |
put(K key,
V value)
Stores a key-value pair in the cache.
|
boolean |
remove(K key)
Remove the entry associated with this key.
|
void |
removeAll()
Remove all entries from the cache
|
public V get(K key)
Cache
public void put(K key, V value)
Cache
NullPointerException
will be
thrown if the key or the value are null
.public boolean remove(K key)
Cache