|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap org.geotools.util.WeakValueHashMap
A hashtable-based Map
implementation with weak values. An entry in a
will automatically be removed when its value is no longer
in ordinary use. This class is similar to the standard WeakHashMap
class provided
is J2SE, except that weak references are hold on values instead of keys.
The class is thread-safe.
WeakHashMap
,
WeakHashSet
Constructor Summary | |
WeakValueHashMap()
Construct a . |
Method Summary | |
void |
clear()
Removes all of the elements from this map. |
boolean |
containsKey(java.lang.Object key)
Returns if this map contains a mapping for the specified key. |
boolean |
containsValue(java.lang.Object value)
Returns if this map maps one or more keys to this value. |
java.util.Set |
entrySet()
Returns a set view of the mappings contained in this map. |
java.lang.Object |
get(java.lang.Object key)
Returns the value to which this map maps the specified key. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Associates the specified value with the specified key in this map. |
java.lang.Object |
remove(java.lang.Object key)
Removes the mapping for this key from this map if present. |
int |
size()
Returns the number of key-value mappings in this map. |
Methods inherited from class java.util.AbstractMap |
clone, equals, hashCode, isEmpty, keySet, putAll, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WeakValueHashMap()
Method Detail |
public int size()
public boolean containsValue(java.lang.Object value)
value
- value whose presence in this map is to be tested.
public boolean containsKey(java.lang.Object key)
key
- key whose presence in this map is to be tested.
java.lang.NullPointerException
- If key is .public java.lang.Object get(java.lang.Object key)
key
- Key whose associated value is to be returned.
java.lang.NullPointerException
- if the key is .public java.lang.Object put(java.lang.Object key, java.lang.Object value)
WeakReference
.
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.
java.lang.NullPointerException
- if the key or the value is .public java.lang.Object remove(java.lang.Object key)
key
- key whose mapping is to be removed from the map.
public void clear()
public java.util.Set entrySet()
Map.Entry
.
The current implementation thrown UnsupportedOperationException
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |