JBoss Common Classes 2.2.17.GA

org.jboss.util.collection
Class ReferenceValueTreeMap<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>
Type Parameters:
K - the key type
V - the value type
All Implemented Interfaces:
Map<K,V>
Direct Known Subclasses:
SoftValueTreeMap, WeakValueTreeMap

public abstract class ReferenceValueTreeMap<K,V>
extends ReferenceValueMap<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
protected ReferenceValueTreeMap()
           
protected ReferenceValueTreeMap(Comparator<K> comparator)
           
protected ReferenceValueTreeMap(SortedMap<K,ValueRef<K,V>> sorted)
           
 
Method Summary
protected  Map<K,ValueRef<K,V>> createMap()
          Create map.
protected  Map<K,ValueRef<K,V>> createMap(Comparator<K> comparator)
          Create map.
protected  Map<K,ValueRef<K,V>> createMap(int initialCapacity)
          Create map.
protected  Map<K,ValueRef<K,V>> createMap(int initialCapacity, float loadFactor)
          Create map.
protected  Map<K,ValueRef<K,V>> createMap(SortedMap<K,ValueRef<K,V>> map)
          Create map.
 
Methods inherited from class org.jboss.util.collection.ReferenceValueMap
clear, containsKey, create, 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

ReferenceValueTreeMap

protected ReferenceValueTreeMap()

ReferenceValueTreeMap

protected ReferenceValueTreeMap(Comparator<K> comparator)

ReferenceValueTreeMap

protected ReferenceValueTreeMap(SortedMap<K,ValueRef<K,V>> sorted)
Method Detail

createMap

protected Map<K,ValueRef<K,V>> createMap()
Description copied from class: ReferenceValueMap
Create map.

Specified by:
createMap in class ReferenceValueMap<K,V>
Returns:
new map instance

createMap

protected Map<K,ValueRef<K,V>> createMap(Comparator<K> comparator)
Description copied from class: ReferenceValueMap
Create map.

Specified by:
createMap in class ReferenceValueMap<K,V>
Parameters:
comparator - the comparator
Returns:
new map instance

createMap

protected Map<K,ValueRef<K,V>> createMap(SortedMap<K,ValueRef<K,V>> map)
Description copied from class: ReferenceValueMap
Create map.

Specified by:
createMap in class ReferenceValueMap<K,V>
Parameters:
map - the sorted map
Returns:
new map instance

createMap

protected Map<K,ValueRef<K,V>> createMap(int initialCapacity)
Description copied from class: ReferenceValueMap
Create map.

Specified by:
createMap in class ReferenceValueMap<K,V>
Parameters:
initialCapacity - the initial capacity
Returns:
new map instance

createMap

protected Map<K,ValueRef<K,V>> createMap(int initialCapacity,
                                         float loadFactor)
Description copied from class: ReferenceValueMap
Create map.

Specified by:
createMap in class ReferenceValueMap<K,V>
Parameters:
initialCapacity - the initial capacity
loadFactor - the load factor
Returns:
new map instance

JBoss Common Classes 2.2.17.GA

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