com.filenet.wcm.toolkit.util

Class WcmSoftReferenceMap

  1. java.lang.Object
  2. extended byjava.util.AbstractMap<K,V>
  3. extended byjava.util.HashMap
  4. extended bycom.filenet.wcm.toolkit.util.WcmSoftReferenceMap
All implemented interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

  1. public class WcmSoftReferenceMap
  2. 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

Nested Class Summary

Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>

Constructor Summary

Constructor and Description
WcmSoftReferenceMap()
WcmSoftReferenceMap(int initialCapacity)
WcmSoftReferenceMap(int initialCapacity,float loadFactor)
WcmSoftReferenceMap(java.util.Map t)

Method Summary

Modifier and Type Method and Description
  1. boolean
containsValue(java.lang.Object value)
  1. java.util.Set
entrySet()
  1. java.lang.Object
get(java.lang.Object key)
  1. java.lang.Object
put(java.lang.Object key,java.lang.Object value)
  1. java.lang.Object
remove(java.lang.Object key)
  1. 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

  1. public WcmSoftReferenceMap()

WcmSoftReferenceMap

  1. public WcmSoftReferenceMap(int initialCapacity)

WcmSoftReferenceMap

  1. public WcmSoftReferenceMap(int initialCapacity,
  2. float loadFactor)

WcmSoftReferenceMap

  1. public WcmSoftReferenceMap(java.util.Map t)

Method Detail

remove

  1. public java.lang.Object remove( java.lang.Object key)
Specified by:
remove in interface java.util.Map
Overrides:
remove in class java.util.HashMap

containsValue

  1. public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map
Overrides:
containsValue in class java.util.HashMap

entrySet

  1. public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map
Overrides:
entrySet in class java.util.HashMap

get

  1. public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
Overrides:
get in class java.util.HashMap

values

  1. public java.util.Collection values( )
Specified by:
values in interface java.util.Map
Overrides:
values in class java.util.HashMap

put

  1. public java.lang.Object put(java.lang.Object key,
  2. java.lang.Object value)
Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.HashMap