Package org.jboss.util.collection
Class ReferenceValueHashMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.jboss.util.collection.ReferenceValueMap<K,V>
-
- org.jboss.util.collection.ReferenceValueHashMap<K,V>
-
- Type Parameters:
K
- the key typeV
- the value type
- All Implemented Interfaces:
java.util.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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReferenceValueHashMap()
protected
ReferenceValueHashMap(int initialCapacity)
protected
ReferenceValueHashMap(int initialCapacity, float loadFactor)
protected
ReferenceValueHashMap(java.util.Map<K,V> t)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<K,ValueRef<K,V>>
createMap()
Create map.protected java.util.Map<K,ValueRef<K,V>>
createMap(int initialCapacity)
Create map.protected java.util.Map<K,ValueRef<K,V>>
createMap(int initialCapacity, float loadFactor)
Create map.protected java.util.Map<K,ValueRef<K,V>>
createMap(java.util.Comparator<K> kComparator)
Create map.protected java.util.Map<K,ValueRef<K,V>>
createMap(java.util.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
-
-
-
-
Method Detail
-
createMap
protected java.util.Map<K,ValueRef<K,V>> createMap(int initialCapacity, float loadFactor)
Description copied from class:ReferenceValueMap
Create map.- Specified by:
createMap
in classReferenceValueMap<K,V>
- Parameters:
initialCapacity
- the initial capacityloadFactor
- the load factor- Returns:
- new map instance
-
createMap
protected java.util.Map<K,ValueRef<K,V>> createMap(int initialCapacity)
Description copied from class:ReferenceValueMap
Create map.- Specified by:
createMap
in classReferenceValueMap<K,V>
- Parameters:
initialCapacity
- the initial capacity- Returns:
- new map instance
-
createMap
protected java.util.Map<K,ValueRef<K,V>> createMap()
Description copied from class:ReferenceValueMap
Create map.- Specified by:
createMap
in classReferenceValueMap<K,V>
- Returns:
- new map instance
-
createMap
protected java.util.Map<K,ValueRef<K,V>> createMap(java.util.Comparator<K> kComparator)
Description copied from class:ReferenceValueMap
Create map.- Specified by:
createMap
in classReferenceValueMap<K,V>
- Parameters:
kComparator
- the comparator- Returns:
- new map instance
-
createMap
protected java.util.Map<K,ValueRef<K,V>> createMap(java.util.SortedMap<K,ValueRef<K,V>> kValueRefSortedMap)
Description copied from class:ReferenceValueMap
Create map.- Specified by:
createMap
in classReferenceValueMap<K,V>
- Parameters:
kValueRefSortedMap
- the sorted map- Returns:
- new map instance
-
-