| 
 | Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractMap
com.beasys.commerce.util.SoftHashMap
@Deprecated public class SoftHashMap
A map implemented using SoftReferences to store the values.
Unlike the java.util.WeakHashMap implementation, this does
 not utilize a ReferenceQueue, therefore, the References are cleared
 immediately, rather than only after a modification to the Map.
 Additionally, since this uses SoftReferences by default, the Map shouldn't
 be immediately cleared. Finally, this is also cloneable and
 serializable.
| Constructor Summary | |
|---|---|
| SoftHashMap()Deprecated See BEA Commerce product offering | |
| SoftHashMap(int initialCapacity)Deprecated See BEA Commerce product offering | |
| SoftHashMap(int initialCapacity,
            float loadFactor)Deprecated See BEA Commerce product offering | |
| SoftHashMap(Map map)Deprecated See BEA Commerce product offering | |
| Method Summary | |
|---|---|
|  void | clear()Deprecated See BEA Commerce product offering | 
|  Object | clone()Deprecated See BEA Commerce product offering | 
|  boolean | containsKey(Object key)Deprecated See BEA Commerce product offering | 
|  boolean | containsValue(Object value)Deprecated See BEA Commerce product offering | 
| protected  Reference | createReference(Object data)Deprecated See BEA Commerce product offering | 
|  Set | entrySet()Deprecated See BEA Commerce product offering | 
|  Object | get(Object key)Deprecated See BEA Commerce product offering | 
|  boolean | isEmpty()Deprecated See BEA Commerce product offering | 
|  Object | put(Object key,
    Object value)Deprecated See BEA Commerce product offering | 
|  Object | remove(Object key)Deprecated See BEA Commerce product offering | 
|  int | size()Deprecated See BEA Commerce product offering | 
| Methods inherited from class java.util.AbstractMap | 
|---|
| equals, hashCode, keySet, putAll, toString, values | 
| Methods inherited from class java.lang.Object | 
|---|
| finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface java.util.Map | 
|---|
| equals, hashCode, keySet, putAll, values | 
| Constructor Detail | 
|---|
public SoftHashMap(int initialCapacity,
                   float loadFactor)
SoftHashMap with the given
 initial capacity and the given load factor.
initialCapacity - The initial capacity of the
                          SoftHashMaploadFactor - The load factor of the SoftHashMap
IllegalArgumentException - If the initial capacity is less than
                                   zero, or if the load factor is
                                   nonpositivepublic SoftHashMap(int initialCapacity)
SoftHashMap with the given
 initial capacity and the default load factor, which is
 0.75.
initialCapacity - The initial capacity of the
                          SoftHashMap
IllegalArgumentException - If the initial capacity is less than
                                   zeropublic SoftHashMap()
SoftHashMap with the default
 capacity and the default load factor, which is 0.75.
public SoftHashMap(Map map)
SoftHashMap from the specified Map.
| Method Detail | 
|---|
public Object clone()
clone in class AbstractMapprotected Reference createReference(Object data)
This implementation returns SoftReferences. Subclasses can override to return other Reference types.
data - the object (can be null).
public int size()
Map interface, the time required by this operation is
 linear in the size of the map.
size in interface Mapsize in class AbstractMappublic boolean isEmpty()
true if this map contains no key-value mappings.
isEmpty in interface MapisEmpty in class AbstractMappublic boolean containsKey(Object key)
true if this map contains a mapping for the
 specified key.
containsKey in interface MapcontainsKey in class AbstractMapkey - The key whose presence in this map is to be testedpublic boolean containsValue(Object value)
true if this map contains the specified value.
containsValue in interface MapcontainsValue in class AbstractMappublic Object get(Object key)
key.
 If this map does not contain a value for this key, then return
 null.
get in interface Mapget in class AbstractMapkey - The key whose associated value, if any, is to be returned
public Object put(Object key,
                  Object value)
key maps to the given
 value.  If the map previously contained a mapping for
 key then that mapping is replaced and the previous value is
 returned.
put in interface Mapput in class AbstractMapkey - The key that is to be mapped to the given
                valuevalue - The value to which the given key is to be
                mapped
null if if there was no mapping for the keypublic Object remove(Object key)
key from this map, if
 present.
remove in interface Mapremove in class AbstractMapkey - The key whose mapping is to be removed
null if
          there was no mapping for the keypublic void clear()
clear in interface Mapclear in class AbstractMappublic Set entrySet()
Set view of the mappings in this map.
entrySet in interface MapentrySet in class AbstractMap| 
 | Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||