com.filenet.wcm.toolkit.util
Class WcmSoftReferenceMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended bycom.filenet.wcm.toolkit.util.WcmSoftReferenceMap
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class WcmSoftReferenceMap
extends java.util.HashMap

This class is similar to the HashMap, which this class extends, except that the values are stored as SoftReferences. This means that when the memory runs low, the JVM can garbage-collect them. When that happens, the get() method will return null, and the key for that object will be removed.

Note: keys are not automatically garbage-collected, so using large objects as keys is not recommended.

The performace of this class should be similar to HashMap.

See Also:
Serialized Form

Constructor Summary
WcmSoftReferenceMap()
           
WcmSoftReferenceMap(int initialCapacity)
           
WcmSoftReferenceMap(int initialCapacity, float loadFactor)
           
WcmSoftReferenceMap(java.util.Map t)
           
 
Method Summary
 boolean containsValue(java.lang.Object value)
           
 java.util.Set entrySet()
           
 java.lang.Object get(java.lang.Object key)
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 java.lang.Object remove(java.lang.Object key)
           
 java.util.Collection values()
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, isEmpty, keySet, putAll, size
 
Methods inherited from class java.util.AbstractMap
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
 

Constructor Detail

WcmSoftReferenceMap

public WcmSoftReferenceMap()

WcmSoftReferenceMap

public WcmSoftReferenceMap(int initialCapacity)

WcmSoftReferenceMap

public WcmSoftReferenceMap(int initialCapacity,
                           float loadFactor)

WcmSoftReferenceMap

public WcmSoftReferenceMap(java.util.Map t)
Method Detail

remove

public java.lang.Object remove(java.lang.Object key)

containsValue

public boolean containsValue(java.lang.Object value)

entrySet

public java.util.Set entrySet()

get

public java.lang.Object get(java.lang.Object key)

values

public java.util.Collection values()

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.