Package org.jboss.util.collection
Class SoftValueTreeMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.jboss.util.collection.ReferenceValueMap<K,V>
-
- org.jboss.util.collection.ReferenceValueTreeMap<K,V>
-
- org.jboss.util.collection.SoftValueTreeMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
public class SoftValueTreeMap<K,V> extends ReferenceValueTreeMap<K,V>
This Map will remove entries when the value in the map has been cleaned from garbage collection
-
-
Constructor Summary
Constructors Constructor Description SoftValueTreeMap()
SoftValueTreeMap(java.util.Comparator<K> comparator)
SoftValueTreeMap(java.util.SortedMap<K,ValueRef<K,V>> sorted)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ValueRef<K,V>
create(K key, V value, java.lang.ref.ReferenceQueue<V> q)
Create new value ref instance.-
Methods inherited from class org.jboss.util.collection.ReferenceValueTreeMap
createMap, createMap, createMap, createMap, createMap
-
Methods inherited from class org.jboss.util.collection.ReferenceValueMap
clear, containsKey, entrySet, get, put, remove, size, toString
-
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, values
-
-
-
-
Method Detail
-
create
protected ValueRef<K,V> create(K key, V value, java.lang.ref.ReferenceQueue<V> q)
Description copied from class:ReferenceValueMap
Create new value ref instance.- Specified by:
create
in classReferenceValueMap<K,V>
- Parameters:
key
- the keyvalue
- the valueq
- the ref queue- Returns:
- new value ref instance
-
-