JBoss Common Classes 2.2.17.GA

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

public abstract class ReferenceValueHashMap<K,V>
extends ReferenceValueMap<K,V>

This Map will remove entries when the value in the map has been cleaned from garbage collection

Author:
Bill Burke, Adrian Brock, 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 ReferenceValueHashMap()
           
protected ReferenceValueHashMap(int initialCapacity)
           
protected ReferenceValueHashMap(int initialCapacity, float loadFactor)
           
protected ReferenceValueHashMap(Map<K,V> t)
           
 
Method Summary
protected  Map<K,ValueRef<K,V>> createMap()
          Create map.
protected  Map<K,ValueRef<K,V>> createMap(Comparator<K> kComparator)
          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>> kValueRefSortedMap)
          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

ReferenceValueHashMap

protected ReferenceValueHashMap()

ReferenceValueHashMap

protected ReferenceValueHashMap(int initialCapacity)

ReferenceValueHashMap

protected ReferenceValueHashMap(int initialCapacity,
                                float loadFactor)

ReferenceValueHashMap

protected ReferenceValueHashMap(Map<K,V> t)
Method Detail

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

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()
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> kComparator)
Description copied from class: ReferenceValueMap
Create map.

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

createMap

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

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

JBoss Common Classes 2.2.17.GA

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