public class WeakValueMap<K,V>
extends java.lang.Object
implements java.util.Map<K,V>
| Modifier and Type | Field and Description | 
|---|---|
| protected java.util.Map<K,WeakEntry<V>> | contentsThe contents. | 
| protected java.lang.ref.ReferenceQueue<V> | queueThe reference queue. | 
| Constructor and Description | 
|---|
| WeakValueMap()Create a new weak value map. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Clear the map. | 
| boolean | containsKey(java.lang.Object key)Test if key contained. | 
| boolean | containsValue(java.lang.Object value)Test if value contained. | 
| java.util.Set<java.util.Map.Entry<K,V>> | entrySet()Get the entries. | 
| protected void | expungeStaleEntries()Remove garbage collected entries. | 
| V | get(java.lang.Object key)Get value for key. | 
| boolean | isEmpty()Check if empty. | 
| java.util.Set<K> | keySet()Get the key set. | 
| V | put(K key,
   V value)Add value for key. | 
| void | putAll(java.util.Map<? extends K,? extends V> m)Add all mappings. | 
| V | remove(java.lang.Object key)Remove value for key. | 
| int | size()Get the size. | 
| java.util.Collection<V> | values()Get the values. | 
protected java.lang.ref.ReferenceQueue<V> queue
public boolean isEmpty()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public V get(java.lang.Object key)
public V remove(java.lang.Object key)
public java.util.Set<K> keySet()
public java.util.Collection<V> values()
protected final void expungeStaleEntries()