Package org.multiverse.collections
Class AbstractTxnMap<K,V>
java.lang.Object
org.multiverse.collections.AbstractTxnMap<K,V>
- Direct Known Subclasses:
NaiveTxnHashMap
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
Returns aTxnSet
view of the mappings contained in this map.final Stm
getStm()
boolean
isEmpty()
boolean
Returns true if this map contains no key-value mappings.keySet()
Returns aTxnSet
view of the keys contained in this map.void
void
Copies all of the mappings from the specified map to this map (optional operation).int
size()
toString()
values()
Returns aTxnCollection
view of the values contained in this map.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
stm
-
defaultRefFactory
-
-
Constructor Details
-
AbstractTxnMap
-
-
Method Details
-
getStm
Description copied from interface:TxnMap
-
size
public int size() -
isEmpty
public boolean isEmpty() -
isEmpty
Description copied from interface:TxnMap
Returns true if this map contains no key-value mappings. -
clear
public void clear() -
get
-
put
-
remove
-
keySet
Description copied from interface:TxnMap
Returns aTxnSet
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. -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
putAll
-
putAll
Description copied from interface:TxnMap
Copies all of the mappings from the specified map to this map (optional operation). The effect of this call is equivalent to that of callingput(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. -
values
Description copied from interface:TxnMap
Returns aTxnCollection
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. -
entrySet
Description copied from interface:TxnMap
Returns aTxnSet
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. -
toString
-