K - the key typeV - the value typepublic class WeakValueHashMap<K,V> extends ReferenceValueHashMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
WeakValueHashMap()
Constructs a new, empty
WeakValueHashMap with the default
initial capacity and the default load factor, which is
0.75. |
WeakValueHashMap(int initialCapacity)
Constructs a new, empty
WeakValueHashMap with the given
initial capacity and the default load factor, which is
0.75. |
WeakValueHashMap(int initialCapacity,
float loadFactor)
Constructs a new, empty
WeakValueHashMap with the given
initial capacity and the given load factor. |
WeakValueHashMap(Map<K,V> t)
Constructs a new
WeakValueHashMap 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 WeakValueHashMap(int initialCapacity,
float loadFactor)
WeakValueHashMap with the given
initial capacity and the given load factor.initialCapacity - The initial capacity of the
WeakValueHashMaploadFactor - The load factor of the WeakValueHashMapIllegalArgumentException - If the initial capacity is less than
zero, or if the load factor is
nonpositivepublic WeakValueHashMap(int initialCapacity)
WeakValueHashMap with the given
initial capacity and the default load factor, which is
0.75.initialCapacity - The initial capacity of the
WeakValueHashMapIllegalArgumentException - If the initial capacity is less than
zeropublic WeakValueHashMap()
WeakValueHashMap with the default
initial capacity and the default load factor, which is
0.75.public WeakValueHashMap(Map<K,V> t)
WeakValueHashMap with the same mappings as the
specified Map. The WeakValueHashMap 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.