Package org.eclipse.collections.api.map
Interface ConcurrentMutableMap<K,V>
- All Superinterfaces:
Cloneable
,ConcurrentMap<K,V>
,InternalIterable<V>
,Iterable<V>
,Map<K,V>
,MapIterable<K,V>
,MutableMap<K,V>
,MutableMapIterable<K,V>
,RichIterable<V>
,UnsortedMapIterable<K,V>
- All Known Implementing Classes:
ConcurrentHashMap
,ConcurrentHashMapUnsafe
,ConcurrentMutableHashMap
public interface ConcurrentMutableMap<K,V> extends MutableMap<K,V>, ConcurrentMap<K,V>
A ConcurrentMutableMap provides an api which combines and supports both MutableMap and ConcurrentMap.
-
Nested Class Summary
-
Method Summary
Modifier and Type Method Description default V
getOrDefault(Object key, V defaultValue)
ConcurrentMutableMap<K,V>
tap(Procedure<? super V> procedure)
Executes the Procedure for each value of the map and returnsthis
.default ConcurrentMutableMap<K,V>
withMap(Map<? extends K,? extends V> map)
Similar toMap.putAll(Map)
, but returns this instead of voidMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, merge, putIfAbsent, remove, replace, replace, replaceAll
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndex
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
Methods inherited from interface org.eclipse.collections.api.map.MapIterable
containsKey, containsValue, detect, detectOptional, equals, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getIfAbsentValue, getIfAbsentWith, hashCode, ifPresentApply, keysView, keyValuesView, parallelStream, spliterator, stream, toString, valuesView
Methods inherited from interface org.eclipse.collections.api.map.MutableMap
aggregateBy, aggregateBy, aggregateInPlaceBy, asSynchronized, asUnmodifiable, clone, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectKeysAndValues, collectLong, collectShort, collectValues, collectWith, flatCollect, flatCollectWith, flip, flipUniqueValues, groupBy, groupByEach, groupByUniqueKey, newEmpty, partition, partitionWith, reject, reject, rejectWith, select, select, selectInstancesOf, selectWith, withAllKeyValueArguments, withAllKeyValues, withKeyValue, withoutAllKeys, withoutKey, zip, zipWithIndex
Methods inherited from interface org.eclipse.collections.api.map.MutableMapIterable
add, countBy, countByEach, countByWith, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, putPair, removeAllKeys, removeIf, removeKey, sumByDouble, sumByFloat, sumByInt, sumByLong, toImmutable, updateValue, updateValueWith
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsBy, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndex
-
Method Details
-
tap
Description copied from interface:MapIterable
Executes the Procedure for each value of the map and returnsthis
.return peopleByCity.tap(person -> LOGGER.info(person.getName()));
- Specified by:
tap
in interfaceMapIterable<K,V>
- Specified by:
tap
in interfaceMutableMap<K,V>
- Specified by:
tap
in interfaceMutableMapIterable<K,V>
- Specified by:
tap
in interfaceRichIterable<K>
- Specified by:
tap
in interfaceUnsortedMapIterable<K,V>
- See Also:
RichIterable.forEach(Procedure)
-
getOrDefault
- Specified by:
getOrDefault
in interfaceConcurrentMap<K,V>
- Specified by:
getOrDefault
in interfaceMap<K,V>
- Specified by:
getOrDefault
in interfaceMapIterable<K,V>
- Specified by:
getOrDefault
in interfaceMutableMapIterable<K,V>
-
withMap
Description copied from interface:MutableMapIterable
Similar toMap.putAll(Map)
, but returns this instead of void- Specified by:
withMap
in interfaceMutableMap<K,V>
- Specified by:
withMap
in interfaceMutableMapIterable<K,V>
- See Also:
Map.putAll(Map)
-