public class WeakCache extends AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
WeakCache()
Construct a WeakCache with weak keys.
|
WeakCache(Map map)
Construct a WeakCache.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
protected Reference |
createReference(Object value) |
Set |
entrySet() |
boolean |
equals(Object o) |
Object |
get(Object key) |
int |
hashCode() |
Set |
keySet() |
Object |
put(Object key,
Object value) |
Object |
remove(Object key) |
int |
size() |
String |
toString() |
Collection |
values() |
clone, isEmpty, putAllfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic WeakCache()
Note, that the internally used WeakHashMap is not thread-safe.
map - the map to usepublic WeakCache(Map map)
map - the map to usepublic Object get(Object key)
get in interface Mapget in class AbstractMappublic Object put(Object key, Object value)
put in interface Mapput in class AbstractMappublic Object remove(Object key)
remove in interface Mapremove in class AbstractMappublic boolean containsValue(Object value)
containsValue in interface MapcontainsValue in class AbstractMappublic int size()
size in interface Mapsize in class AbstractMappublic Collection values()
values in interface Mapvalues in class AbstractMappublic Set entrySet()
entrySet in interface MapentrySet in class AbstractMappublic boolean containsKey(Object key)
containsKey in interface MapcontainsKey in class AbstractMappublic void clear()
clear in interface Mapclear in class AbstractMappublic Set keySet()
keySet in interface MapkeySet in class AbstractMappublic boolean equals(Object o)
equals in interface Mapequals in class AbstractMappublic int hashCode()
hashCode in interface MaphashCode in class AbstractMappublic String toString()
toString in class AbstractMapCopyright © 2015. All rights reserved.