Package jadex.commons.collection
Class WeakKeyValueMap<K,V>
- java.lang.Object
-
- jadex.commons.collection.WeakKeyValueMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
public class WeakKeyValueMap<K,V> extends java.lang.Object implements java.util.Map<K,V>
HashMap with weak reference on both sides.
-
-
Constructor Summary
Constructors Constructor Description WeakKeyValueMap()
WeakKeyValueMap(java.util.Map<? extends K,? extends V> m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears map.boolean
containsKey(java.lang.Object key)
Returns if key is contained.boolean
containsValue(java.lang.Object value)
Returns if value is contained.java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
Returns the entry set.V
get(java.lang.Object key)
Gets the value for key.boolean
isEmpty()
Returns if empty.java.util.Set<K>
keySet()
Returns the key set.V
put(K key, V value)
Adds value for key.void
putAll(java.util.Map<? extends K,? extends V> m)
Adds other map content.V
remove(java.lang.Object key)
Removes key.int
size()
Returns the size of the map.java.util.Collection<V>
values()
Returns the values.
-
-
-
Method Detail
-
size
public int size()
Returns the size of the map.
-
isEmpty
public boolean isEmpty()
Returns if empty.
-
containsKey
public boolean containsKey(java.lang.Object key)
Returns if key is contained.
-
containsValue
public boolean containsValue(java.lang.Object value)
Returns if value is contained.
-
get
public V get(java.lang.Object key)
Gets the value for key.
-
remove
public V remove(java.lang.Object key)
Removes key.
-
keySet
public java.util.Set<K> keySet()
Returns the key set.
-
values
public java.util.Collection<V> values()
Returns the values.
-
-