public class SoftValueHashMap<K,V> extends ReferenceValueHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
SoftValueHashMap()
Constructs a new, empty
SoftValueHashMap with the default
initial capacity and the default load factor, which is
0.75. |
SoftValueHashMap(int initialCapacity)
Constructs a new, empty
SoftValueHashMap with the given
initial capacity and the default load factor, which is
0.75. |
SoftValueHashMap(int initialCapacity,
float loadFactor)
Constructs a new, empty
SoftValueHashMap with the given
initial capacity and the given load factor. |
SoftValueHashMap(Map<K,V> t)
Constructs a new
SoftValueHashMap with the same mappings as the
specified Map. |
| Modifier and Type | Method and Description |
|---|---|
protected ValueRef<K,V> |
create(K key,
V value,
ReferenceQueue<V> q)
Create new value ref instance.
|
createMap, createMap, createMap, createMap, createMapclear, containsKey, entrySet, get, put, remove, size, toStringclone, containsValue, equals, hashCode, isEmpty, keySet, putAll, valuespublic SoftValueHashMap(int initialCapacity,
float loadFactor)
SoftValueHashMap with the given
initial capacity and the given load factor.initialCapacity - The initial capacity of the
SoftValueHashMaploadFactor - The load factor of the SoftValueHashMapIllegalArgumentException - If the initial capacity is less than
zero, or if the load factor is
nonpositivepublic SoftValueHashMap(int initialCapacity)
SoftValueHashMap with the given
initial capacity and the default load factor, which is
0.75.initialCapacity - The initial capacity of the
SoftValueHashMapIllegalArgumentException - If the initial capacity is less than
zeropublic SoftValueHashMap()
SoftValueHashMap with the default
initial capacity and the default load factor, which is
0.75.public SoftValueHashMap(Map<K,V> t)
SoftValueHashMap with the same mappings as the
specified Map. The SoftValueHashMap is created with an
initial capacity of twice the number of mappings in the specified map
or 11 (whichever is greater), and a default load factor, which is
0.75.t - the map whose mappings are to be placed in this map.protected ValueRef<K,V> create(K key, V value, ReferenceQueue<V> q)
ReferenceValueMapcreate in class ReferenceValueMap<K,V>key - the keyvalue - the valueq - the ref queueCopyright © 2015 JBoss by Red Hat. All rights reserved.