Interface ConcurrentMap<K,V>
- All Superinterfaces:
Map<K,V>
- All Known Implementing Classes:
ConcurrentHashMap
A map whose compound operations are atomic. The four methods it declares
are default methods of
Map as well; an implementation makes them atomic.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionputIfAbsent(K key, V value) If the specified key is not already associated with a value (or is mapped tonull) associates it with the given value and returnsnull, else returns the current value.booleanRemoves the entry for the specified key only if it is currently mapped to the specified value.Replaces the entry for the specified key only if it is currently mapped to some value.booleanReplaces the entry for the specified key only if currently mapped to the specified value.Methods inherited from interface Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, remove, replaceAll, size, values
-
Method Details
-
putIfAbsent
-
remove
-
replace
-
replace
-