edu.toronto.cs.util
Class WeakWeakHashMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.WeakHashMap
edu.toronto.cs.util.WeakWeakHashMap
- All Implemented Interfaces:
- java.util.Map
public class WeakWeakHashMap
- extends java.util.WeakHashMap
Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Method Summary |
void |
clear()
|
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Here we put the key, value pair into the HashMap using
a WeakValue object. |
java.lang.Object |
remove(java.lang.Object key)
|
int |
size()
|
Methods inherited from class java.util.WeakHashMap |
containsKey, containsValue, isEmpty, keySet, putAll, values |
Methods inherited from class java.util.AbstractMap |
clone, equals, hashCode, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
WeakWeakHashMap
public WeakWeakHashMap()
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map
- Overrides:
get
in class java.util.WeakHashMap
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Here we put the key, value pair into the HashMap using
a WeakValue object.
- Specified by:
put
in interface java.util.Map
- Overrides:
put
in class java.util.WeakHashMap
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interface java.util.Map
- Overrides:
remove
in class java.util.WeakHashMap
clear
public void clear()
- Specified by:
clear
in interface java.util.Map
- Overrides:
clear
in class java.util.WeakHashMap
size
public int size()
- Specified by:
size
in interface java.util.Map
- Overrides:
size
in class java.util.WeakHashMap
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet
in interface java.util.Map
- Overrides:
entrySet
in class java.util.WeakHashMap