public class WeakValueHashMap<K,V> extends AbstractMap<K,V> implements Serializable
Map implementation that maps keys to weakly referenced values. Keys in this map must be non-null Object objects.
Values must be non-null. See java.util.WeakHashMap in the Java API, which has weak keys instead of weak values.WeakHashMap,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected class |
WeakValueHashMap.EntrySet<K1,V1> |
protected static class |
WeakValueHashMap.MyWeakReference<T> |
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
WeakValueHashMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object p_key) |
boolean |
containsValue(Object o) |
protected WeakValueHashMap.MyWeakReference<V> |
createReference(K key,
V value,
ReferenceQueue<WeakValueHashMap.MyWeakReference<V>> refQueue) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object p_key) |
boolean |
isEmpty() |
Set |
keySet() |
V |
put(K key,
V p_value) |
V |
remove(Object p_key) |
protected void |
removeReference(WeakValueHashMap.MyWeakReference<V> discarded) |
int |
size() |
Collection<V> |
values() |
finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic int size()
public boolean containsValue(Object o)
containsValue in interface Map<K,V>containsValue in class AbstractMap<K,V>public boolean containsKey(Object p_key)
containsKey in interface Map<K,V>containsKey in class AbstractMap<K,V>protected WeakValueHashMap.MyWeakReference<V> createReference(K key, V value, ReferenceQueue<WeakValueHashMap.MyWeakReference<V>> refQueue)
public void clear()
public Set keySet()
public Collection<V> values()
public boolean isEmpty()
protected void removeReference(WeakValueHashMap.MyWeakReference<V> discarded)
Copyright © 2017 SAP SE. All Rights Reserved.