public abstract class AbstractTxnMap<K,V> extends Object implements TxnMap<K,V>
Modifier and Type | Field and Description |
---|---|
protected TxnRefFactory |
defaultRefFactory |
protected Stm |
stm |
Constructor and Description |
---|
AbstractTxnMap(Stm stm) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
TxnSet<Map.Entry<K,V>> |
entrySet()
Returns a
TxnSet view of the mappings contained in this map. |
V |
get(Object key) |
Stm |
getStm()
|
boolean |
isEmpty() |
boolean |
isEmpty(Txn tx)
Returns true if this map contains no key-value mappings.
|
TxnSet<K> |
keySet()
Returns a
TxnSet view of the keys contained in this map. |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
void |
putAll(Txn tx,
Map<? extends K,? extends V> m)
Copies all of the mappings from the specified map to this map
(optional operation).
|
V |
remove(Object key) |
int |
size() |
String |
toString() |
TxnCollection<V> |
values()
Returns a
TxnCollection view of the values contained in this map. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clear, containsKey, containsValue, entrySet, get, keySet, put, remove, size, toString, values
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
protected final Stm stm
protected final TxnRefFactory defaultRefFactory
public AbstractTxnMap(Stm stm)
public boolean isEmpty(Txn tx)
TxnMap
public TxnSet<K> keySet()
TxnMap
TxnSet
view of the keys contained in this map.
The set is backed by the map, so changes to the map are
reflected in the set, and vice-versa. If the map is modified
while an iteration over the set is in progress (except through
the iterator's own remove operation), the results of
the iteration are undefined. The set supports element removal,
which removes the corresponding mapping from the map, via the
Iterator.remove, Set.remove,
removeAll, retainAll, and clear
operations. It does not support the add or addAll
operations.public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
public void putAll(Txn tx, Map<? extends K,? extends V> m)
TxnMap
put(k, v)
on this map once
for each mapping from key k to value v in the
specified map. The behavior of this operation is undefined if the
specified map is modified while the operation is in progress.public TxnCollection<V> values()
TxnMap
TxnCollection
view of the values contained in this map.
The collection is backed by the map, so changes to the map are
reflected in the collection, and vice-versa. If the map is
modified while an iteration over the collection is in progress
(except through the iterator's own remove operation),
the results of the iteration are undefined. The collection
supports element removal, which removes the corresponding
mapping from the map, via the Iterator.remove,
Collection.remove, removeAll,
retainAll and clear operations. It does not
support the add or addAll operations.public TxnSet<Map.Entry<K,V>> entrySet()
TxnMap
TxnSet
view of the mappings contained in this map.
The set is backed by the map, so changes to the map are
reflected in the set, and vice-versa. If the map is modified
while an iteration over the set is in progress (except through
the iterator's own remove operation, or through the
setValue operation on a map entry returned by the
iterator) the results of the iteration are undefined. The set
supports element removal, which removes the corresponding
mapping from the map, via the Iterator.remove,
Set.remove, removeAll, retainAll and
clear operations. It does not support the
add or addAll operations.Copyright © 2020. All rights reserved.