|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--serp.util.RefValueMap
ReferenceMap
.
Abstract base class for maps whose values are stored as weak or soft references.
Subclasses must define the createRefMapValue(java.lang.Object, java.lang.Object, java.lang.ref.ReferenceQueue)
method
only. Expired values are removed from the map before any mutator methods;
removing before accessor methods can lead to
ConcurrentModificationException
s. Thus, the following methods may
produce results which include key/value pairs that have expired:
size
isEmpty
containsKey
keySet.size,contains,isEmpty
entrySet.size,contains,isEmpty
values.size,contains,isEmpty
By default, all methods are delegated to the internal map provided at construction. Thus, the hashing algorithm, ordering, etc of the given map will be preserved. Performance is similar to that of the internal map instance.
Inner Class Summary | |
(package private) static interface |
RefValueMap.RefMapValue
Deprecated. Interface representing a map entry whose value is stored using a weak or soft reference. |
Inner classes inherited from class java.util.Map |
Map.Entry |
Constructor Summary | |
RefValueMap()
Deprecated. Equivalent to RefValueMap (new HashMap ()) . |
|
RefValueMap(Map map)
Deprecated. Construct a RefValueMap with the given interal map. |
Method Summary | |
void |
clear()
Deprecated. |
boolean |
containsKey(Object key)
Deprecated. |
boolean |
containsValue(Object value)
Deprecated. |
protected abstract RefValueMap.RefMapValue |
createRefMapValue(Object key,
Object value,
ReferenceQueue queue)
Deprecated. Create a weak or soft reference to hold the given value. |
Set |
entrySet()
Deprecated. |
boolean |
equals(Object other)
Deprecated. |
Object |
get(Object key)
Deprecated. |
boolean |
isEmpty()
Deprecated. |
Set |
keySet()
Deprecated. |
boolean |
makeHard(Object key)
Deprecated. Harden the reference for the given key. |
boolean |
makeReference(Object key)
Deprecated. Soften the reference for the given key. |
Object |
put(Object key,
Object value)
Deprecated. |
void |
putAll(Map map)
Deprecated. |
Object |
remove(Object key)
Deprecated. |
protected void |
removedReference(Object key)
Deprecated. Invoked when removing references from the reference queue. |
int |
size()
Deprecated. |
String |
toString()
Deprecated. |
Collection |
values()
Deprecated. |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface java.util.Map |
hashCode |
Constructor Detail |
public RefValueMap()
RefValueMap (new HashMap ())
.public RefValueMap(Map map)
LinkedHashMap
,
the values()
method of this map will return values in
insertion order.Method Detail |
public boolean makeHard(Object key)
RefMap
ConcurrentModificationException
s being thrown by any
iterator in use while this method is called.makeHard
in interface RefMap
serp.util.RefMap
public boolean makeReference(Object key)
RefMap
ConcurrentModificationException
s being thrown by any
iterator in use while this method is called.makeReference
in interface RefMap
serp.util.RefMap
public void clear()
clear
in interface Map
public boolean containsKey(Object key)
containsKey
in interface Map
public boolean containsValue(Object value)
containsValue
in interface Map
public Set entrySet()
entrySet
in interface Map
public boolean equals(Object other)
equals
in interface Map
equals
in class Object
public Object get(Object key)
get
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public Set keySet()
keySet
in interface Map
public Object put(Object key, Object value)
put
in interface Map
public void putAll(Map map)
putAll
in interface Map
public Object remove(Object key)
remove
in interface Map
public int size()
size
in interface Map
public Collection values()
values
in interface Map
public String toString()
toString
in class Object
protected abstract RefValueMap.RefMapValue createRefMapValue(Object key, Object value, ReferenceQueue queue)
protected void removedReference(Object key)
key
is the key whose value has expired.
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |