K
- V
- public class RefCountedMap<K,V> extends Object implements Map<K,V>
A variation on a map where values are managed like resources: a put increments a reference count on an existing key-value entry and a remove actually delete the entry when the reference count goes to zero. This was implemented to help with the transactions framework.
Constructor and Description |
---|
RefCountedMap(Map implementation) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object o) |
V |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
public RefCountedMap(Map implementation)
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
public boolean equals(Object o)
Copyright © 2015. All rights reserved.