K
- Key typeV
- Value typepublic abstract class Cache<K,V> extends HashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
Cache()
|
Modifier and Type | Method and Description |
---|---|
V |
get(Object key)
This will return the cached value, or query the value if it is
not already present.
|
abstract V |
getIfAbsent(K key)
The method to get the value given the key.
|
void |
invalidate()
|
void |
update()
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
public V get(Object key)
public abstract V getIfAbsent(K key)
key
- Key.public void update()
public void invalidate()
Copyright © 2020. All rights reserved.