public class WeakKeyValueMap<K,V>
extends java.lang.Object
implements java.util.Map<K,V>
Modifier and Type | Field and Description |
---|---|
protected java.util.WeakHashMap<K,java.lang.ref.WeakReference<V>> |
content
The internal delegate map.
|
Constructor and Description |
---|
WeakKeyValueMap() |
WeakKeyValueMap(java.util.Map<? extends K,? extends V> m) |
Modifier and Type | Method and 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.
|
public int size()
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()