JBoss Common Classes 2.2.17.GA

org.jboss.util.collection
Class SoftValueTreeMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by org.jboss.util.collection.ReferenceValueMap<K,V>
          extended by org.jboss.util.collection.ReferenceValueTreeMap<K,V>
              extended by org.jboss.util.collection.SoftValueTreeMap<K,V>
All Implemented Interfaces:
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

Author:
Ales Justin

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
SoftValueTreeMap()
           
SoftValueTreeMap(Comparator<K> comparator)
           
SoftValueTreeMap(SortedMap<K,ValueRef<K,V>> sorted)
           
 
Method Summary
protected  ValueRef<K,V> create(K key, V value, 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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SoftValueTreeMap

public SoftValueTreeMap()

SoftValueTreeMap

public SoftValueTreeMap(Comparator<K> comparator)

SoftValueTreeMap

public SoftValueTreeMap(SortedMap<K,ValueRef<K,V>> sorted)
Method Detail

create

protected ValueRef<K,V> create(K key,
                               V value,
                               ReferenceQueue<V> q)
Description copied from class: ReferenceValueMap
Create new value ref instance.

Specified by:
create in class ReferenceValueMap<K,V>
Parameters:
key - the key
value - the value
q - the ref queue
Returns:
new value ref instance

JBoss Common Classes 2.2.17.GA

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.