public class WeakValueHashMap extends HashMap
HashMap
,
WeakReference
,
Serialized FormAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
WeakValueHashMap() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key)
Returns true if this map contains a mapping for the specified
key.
|
boolean |
containsValue(Object value)
Returns true if this map maps one or more keys to the
specified value.
|
Set |
entrySet()
Returns a
Set view of the mappings in this map. |
Object |
get(Object key)
Gets the value for the given key.
|
boolean |
isEmpty()
Returns true if this map contains no key-value mappings.
|
Object |
put(Object key,
Object value)
Puts a new (key,value) into the map.
|
Object |
remove(Object key)
Removes key and value for the given key.
|
int |
size()
Returns the number of key-value mappings in this map.
|
Collection |
values()
Returns a
Collection view of the values contained
in this map. |
equals, hashCode, toString
public int size()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface Map
containsKey
in class HashMap
key
- key whose presence in this map is to be testedpublic boolean containsValue(Object value)
containsValue
in interface Map
containsValue
in class HashMap
value
- value whose presence in this map is to be testedpublic Object put(Object key, Object value)
put
in interface Map
put
in class HashMap
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.public Set entrySet()
Set
view of the mappings in this map.public Collection values()
Collection
view of the values contained
in this map.Copyright © 2012-2013 Adele Team | LIG. All Rights Reserved.