Package jadex.commons.collection
Class WeakValueMap<K,V>
- java.lang.Object
-
- jadex.commons.collection.WeakValueMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
public class WeakValueMap<K,V> extends java.lang.Object implements java.util.Map<K,V>
A map with weak values.
-
-
Constructor Summary
Constructors Constructor Description WeakValueMap()
Create a new weak value map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Check if empty.
-
containsKey
public boolean containsKey(java.lang.Object key)
Test if key contained.
-
containsValue
public boolean containsValue(java.lang.Object value)
Test if value contained.
-
get
public V get(java.lang.Object key)
Get value for key.
-
remove
public V remove(java.lang.Object key)
Remove value for key.
-
keySet
public java.util.Set<K> keySet()
Get the key set.
-
values
public java.util.Collection<V> values()
Get the values.
-
expungeStaleEntries
protected final void expungeStaleEntries()
Remove garbage collected entries.
-
-