public class WeakValueHashMap
extends java.util.HashMap
HashMap
,
WeakReference
,
Serialized FormConstructor and Description |
---|
WeakValueHashMap() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.Object key)
Returns true if this map contains a mapping for the specified
key.
|
boolean |
containsValue(java.lang.Object value)
Returns true if this map maps one or more keys to the
specified value.
|
java.util.Set |
entrySet()
Returns a
Set view of the mappings in this map. |
java.lang.Object |
get(java.lang.Object key)
Gets the value for the given key.
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Puts a new (key,value) into the map.
|
java.lang.Object |
remove(java.lang.Object key)
Removes key and value for the given key.
|
int |
size()
Returns the number of key-value mappings in this map.
|
java.util.Collection |
values()
Returns a
Collection view of the values contained
in this map. |
public int size()
size
in interface java.util.Map
size
in class java.util.HashMap
public boolean isEmpty()
isEmpty
in interface java.util.Map
isEmpty
in class java.util.HashMap
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
containsKey
in class java.util.HashMap
key
- key whose presence in this map is to be testedpublic boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
containsValue
in class java.util.HashMap
value
- value whose presence in this map is to be testedpublic java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
get
in class java.util.HashMap
key
- key whose associated value, if any, is to be returnedpublic java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
put
in class java.util.HashMap
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
remove
in class java.util.HashMap
key
- key whose mapping is to be removed from the map.public java.util.Set entrySet()
Set
view of the mappings in this map.entrySet
in interface java.util.Map
entrySet
in class java.util.HashMap
Set
view of the mappings in this map.public java.util.Collection values()
Collection
view of the values contained
in this map.values
in interface java.util.Map
values
in class java.util.HashMap
Collection
view of the values contained
in this map.Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.