org.openorb.util
Class  WeakValueHashMap
java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--org.openorb.util.WeakValueHashMap
- All Implemented Interfaces: 
- java.util.Map
- public class WeakValueHashMap- extends java.util.AbstractMap- implements java.util.Map
- Version: 
- $Revision: 1.7 $ $Date: 2002/06/28 08:59:06 $
- Author: 
- Chris Wood
| Inner classes inherited from class java.util.Map | 
| java.util.Map.Entry | 
 
| Constructor Summary | 
| WeakValueHashMap()Constructs a new, empty
 WeakValueHashMapwith the default
 initial capacity and the default load factor, which is0.75. | 
| WeakValueHashMap(int initialCapacity)Constructs a new, empty
 WeakValueHashMapwith the given
 initial capacity and the default load factor, which is0.75. | 
| WeakValueHashMap(int initialCapacity,
                 float loadFactor)Constructs a new, empty
 WeakValueHashMapwith the given
 initial capacity and the given load factor. | 
| WeakValueHashMap(java.util.Map t)Constructs a new
 WeakValueHashMapwith the same mappings as the
 specified Map. | 
 
| Method Summary | 
|  void | clear()Removes all mappings from this map.
 | 
|  boolean | containsKey(java.lang.Object key)Returns
 trueif this map contains a mapping for the
 specified key. | 
|  java.util.Set | entrySet()Returns a
 Setview of the mappings 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)Updates this map so that the given
 keymaps to the givenvalue. | 
|  java.lang.Object | remove(java.lang.Object key)Removes the mapping for the given
 keyfrom this map, if
 present. | 
 
| Methods inherited from class java.util.AbstractMap | 
| containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values | 
 
| Methods inherited from class java.lang.Object | 
| getClass, notify, notifyAll, wait, wait, wait | 
 
| Methods inherited from interface java.util.Map | 
| containsValue, equals, hashCode, isEmpty, keySet, putAll, size, values | 
 
WeakValueHashMap
public WeakValueHashMap(int initialCapacity,
                        float loadFactor)
- Constructs a new, empty WeakValueHashMapwith the given
 initial capacity and the given load factor.
- 
- Parameters:
- initialCapacity- The initial capacity of the- WeakValueHashMap
- loadFactor- The load factor of the- WeakValueHashMap
 
WeakValueHashMap
public WeakValueHashMap(int initialCapacity)
- Constructs a new, empty WeakValueHashMapwith the given
 initial capacity and the default load factor, which is0.75.
- 
- Parameters:
- initialCapacity- The initial capacity of the- WeakValueHashMap
 
WeakValueHashMap
public WeakValueHashMap()
- Constructs a new, empty WeakValueHashMapwith the default
 initial capacity and the default load factor, which is0.75.
WeakValueHashMap
public WeakValueHashMap(java.util.Map t)
- Constructs a new WeakValueHashMapwith the same mappings as the
 specified Map.  TheWeakValueHashMapis created with an
 initial capacity of twice the number of mappings in the specified map
 or 11 (whichever is greater), and a default load factor, which is
 0.75.
- 
- Parameters:
- t- the map whose mappings are to be placed in this map.
- Since: 
- 1.3
 
entrySet
public java.util.Set entrySet()
- Returns a Setview of the mappings in this map.
- 
- Specified by: 
- entrySetin interface- java.util.Map
- Overrides:
- entrySetin class- java.util.AbstractMap
 
- 
- Returns:
- The set of entries in the map. This method creates an empty set if
 the member is null.
 
containsKey
public boolean containsKey(java.lang.Object key)
- Returns trueif this map contains a mapping for the
 specified key.
- 
- Specified by: 
- containsKeyin interface- java.util.Map
- Overrides:
- containsKeyin class- java.util.AbstractMap
 
- 
- Parameters:
- key- The key whose presence in this map is to be tested.
- Returns:
- True if the internal map contains the key, false otherwise.
 
get
public java.lang.Object get(java.lang.Object key)
- Returns the value to which this map maps the specified key.
 If this map does not contain a value for this key, then returnnull.
- 
- Specified by: 
- getin interface- java.util.Map
- Overrides:
- getin class- java.util.AbstractMap
 
- 
- Parameters:
- key- The key whose associated value, if any, is to be returned
- Returns:
- The value for the spacified key.
 
put
public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
- Updates this map so that the given keymaps to the givenvalue.  If the map previously contained a mapping forkeythen that mapping is replaced and the previous value is
 returned.
- 
- Specified by: 
- putin interface- java.util.Map
- Overrides:
- putin class- java.util.AbstractMap
 
- 
- Parameters:
- key- The key that is to be mapped to the given- value
- value- The value to which the given- keyis to be
                mapped
- Returns:
- The previous value to which this key was mapped, or
          nullif if there was no mapping for the key
 
remove
public java.lang.Object remove(java.lang.Object key)
- Removes the mapping for the given keyfrom this map, if
 present.
- 
- Specified by: 
- removein interface- java.util.Map
- Overrides:
- removein class- java.util.AbstractMap
 
- 
- Parameters:
- key- The key whose mapping is to be removed
- Returns:
- The value to which this key was mapped, or nullif
          there was no mapping for the key
 
clear
public void clear()
- Removes all mappings from this map.- 
- Specified by: 
- clearin interface- java.util.Map
- Overrides:
- clearin class- java.util.AbstractMap