org.jboss.util.collection
K
- the key typeV
- the value typepublic abstract class ReferenceValueMap<K,V> extends AbstractMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier | Constructor and Description |
---|---|
protected |
ReferenceValueMap() |
protected |
ReferenceValueMap(Comparator<K> comparator) |
protected |
ReferenceValueMap(int initialCapacity) |
protected |
ReferenceValueMap(int initialCapacity,
float loadFactor) |
protected |
ReferenceValueMap(Map<K,V> t) |
protected |
ReferenceValueMap(SortedMap<K,ValueRef<K,V>> sorted) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
protected abstract ValueRef<K,V> |
create(K key,
V value,
ReferenceQueue<V> q)
Create new value ref instance.
|
protected abstract Map<K,ValueRef<K,V>> |
createMap()
Create map.
|
protected abstract Map<K,ValueRef<K,V>> |
createMap(Comparator<K> comparator)
Create map.
|
protected abstract Map<K,ValueRef<K,V>> |
createMap(int initialCapacity)
Create map.
|
protected abstract Map<K,ValueRef<K,V>> |
createMap(int initialCapacity,
float loadFactor)
Create map.
|
protected abstract Map<K,ValueRef<K,V>> |
createMap(SortedMap<K,ValueRef<K,V>> map)
Create map.
|
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
V |
put(K key,
V value) |
V |
remove(Object key) |
int |
size() |
String |
toString() |
clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, values
protected ReferenceValueMap()
protected ReferenceValueMap(int initialCapacity)
protected ReferenceValueMap(int initialCapacity, float loadFactor)
protected ReferenceValueMap(Comparator<K> comparator)
protected abstract Map<K,ValueRef<K,V>> createMap(int initialCapacity)
initialCapacity
- the initial capacityprotected abstract Map<K,ValueRef<K,V>> createMap(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacityloadFactor
- the load factorprotected abstract Map<K,ValueRef<K,V>> createMap(Comparator<K> comparator)
comparator
- the comparatorprotected abstract Map<K,ValueRef<K,V>> createMap(SortedMap<K,ValueRef<K,V>> map)
map
- the sorted mappublic int size()
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in class AbstractMap<K,V>
public void clear()
protected abstract ValueRef<K,V> create(K key, V value, ReferenceQueue<V> q)
key
- the keyvalue
- the valueq
- the ref queuepublic String toString()
toString
in class AbstractMap<K,V>
Copyright © 2014 JBoss by Red Hat. All rights reserved.