|
JBoss Common Classes 2.2.17.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
org.jboss.util.collection.ReferenceValueMap<K,V>
K - the key typeV - the value typepublic abstract class ReferenceValueMap<K,V>
This Map will remove entries when the value in the map has been cleaned from garbage collection
| 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 |
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)
|
| Method Summary | |
|---|---|
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()
|
| 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 |
|---|
protected ReferenceValueMap()
protected ReferenceValueMap(int initialCapacity)
protected ReferenceValueMap(int initialCapacity,
float loadFactor)
protected ReferenceValueMap(Map<K,V> t)
protected ReferenceValueMap(Comparator<K> comparator)
protected ReferenceValueMap(SortedMap<K,ValueRef<K,V>> sorted)
| Method Detail |
|---|
protected abstract Map<K,ValueRef<K,V>> createMap()
protected abstract Map<K,ValueRef<K,V>> createMap(int initialCapacity)
initialCapacity - the initial capacity
protected abstract Map<K,ValueRef<K,V>> createMap(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacityloadFactor - the load factor
protected abstract Map<K,ValueRef<K,V>> createMap(Comparator<K> comparator)
comparator - the comparator
protected abstract Map<K,ValueRef<K,V>> createMap(SortedMap<K,ValueRef<K,V>> map)
map - the sorted map
public int size()
size in interface Map<K,V>size in class AbstractMap<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class AbstractMap<K,V>public V get(Object key)
get in interface Map<K,V>get in class AbstractMap<K,V>
public V put(K key,
V value)
put in interface Map<K,V>put in class AbstractMap<K,V>public V remove(Object key)
remove in interface Map<K,V>remove in class AbstractMap<K,V>public Set<Map.Entry<K,V>> entrySet()
entrySet in interface Map<K,V>entrySet in class AbstractMap<K,V>public void clear()
clear in interface Map<K,V>clear in class AbstractMap<K,V>
protected abstract ValueRef<K,V> create(K key,
V value,
ReferenceQueue<V> q)
key - the keyvalue - the valueq - the ref queue
public String toString()
toString in class AbstractMap<K,V>
|
JBoss Common Classes 2.2.17.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||