Package org.eclipse.collections.impl.map
Class AbstractSynchronizedMapIterable<K,V>
java.lang.Object
org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable<V>
org.eclipse.collections.impl.map.AbstractSynchronizedMapIterable<K,V>
- All Implemented Interfaces:
Iterable<V>,Map<K,,V> InternalIterable<V>,MapIterable<K,,V> MutableMapIterable<K,,V> RichIterable<V>
- Direct Known Subclasses:
SynchronizedBiMap,SynchronizedMutableMap,SynchronizedSortedMap
public abstract class AbstractSynchronizedMapIterable<K,V>
extends AbstractSynchronizedRichIterable<V>
implements MutableMapIterable<K,V>
A synchronized view of a map.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription<K1,V1, V2> MutableMapIterable<K1, V2> aggregateBy(Function<? super K, ? extends K1> keyFunction, Function<? super V, ? extends V1> valueFunction, Function0<? extends V2> zeroValueFactory, Function2<? super V2, ? super V1, ? extends V2> nonMutatingAggregator) <KK,VV> MutableMapIterable<KK, VV> aggregateBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Function2<? super VV, ? super V, ? extends VV> nonMutatingAggregator) <KK,VV> MutableMapIterable<KK, VV> aggregateInPlaceBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Procedure2<? super VV, ? super V> mutatingAggregator) voidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) <V1> MutableBag<V1><V1> MutableBag<V1>countByEach(Function<? super V, ? extends Iterable<V1>> function) <V1,P> MutableBag<V1> countByWith(Function2<? super V, ? super P, ? extends V1> function, P parameter) detect(Predicate2<? super K, ? super V> predicate) detectOptional(Predicate2<? super K, ? super V> predicate) voidforEachKey(Procedure<? super K> procedure) voidforEachKeyValue(Procedure2<? super K, ? super V> procedure2) voidforEachValue(Procedure<? super V> procedure) getIfAbsent(K key, Function0<? extends V> function) getIfAbsentPut(K key, Function0<? extends V> function) getIfAbsentPut(K key, V value) <P> VgetIfAbsentPutWith(K key, Function<? super P, ? extends V> function, P parameter) getIfAbsentPutWithKey(K key, Function<? super K, ? extends V> function) getIfAbsentValue(K key, V value) <P> VgetIfAbsentWith(K key, Function<? super P, ? extends V> function, P parameter) <V1> MutableMultimap<V1,V> <V1> MutableMultimap<V1,V> groupByEach(Function<? super V, ? extends Iterable<V1>> function) <VV> MutableMapIterable<VV,V> groupByUniqueKey(Function<? super V, ? extends VV> function) <A> AifPresentApply(K key, Function<? super V, ? extends A> function) keysView()RichIterable<Pair<K,V>> void<KK> MutableMapIterable<KK,V> reduceBy(Function<? super V, ? extends KK> groupBy, Function2<? super V, ? super V, ? extends V> reduceFunction) <P> MutableCollection<V>rejectWith(Predicate2<? super V, ? super P> predicate, P parameter) booleanremoveAllKeys(Set<? extends K> keys) booleanremoveIf(Predicate2<? super K, ? super V> predicate) <S> MutableCollection<S>selectInstancesOf(Class<S> clazz) <P> MutableCollection<V>selectWith(Predicate2<? super V, ? super P> predicate, P parameter) <V1> MutableObjectDoubleMap<V1>sumByDouble(Function<? super V, ? extends V1> groupBy, DoubleFunction<? super V> function) <V1> MutableObjectDoubleMap<V1>sumByFloat(Function<? super V, ? extends V1> groupBy, FloatFunction<? super V> function) <V1> MutableObjectLongMap<V1>sumByInt(Function<? super V, ? extends V1> groupBy, IntFunction<? super V> function) <V1> MutableObjectLongMap<V1>sumByLong(Function<? super V, ? extends V1> groupBy, LongFunction<? super V> function) <P> VupdateValueWith(K key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter) <S> MutableCollection<Pair<V,S>> Methods inherited from class org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collect, collectBoolean, collectBoolean, collectByte, collectByte, collectChar, collectChar, collectDouble, collectDouble, collectFloat, collectFloat, collectIf, collectIf, collectInt, collectInt, collectLong, collectLong, collectShort, collectShort, collectWith, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, equals, flatCollect, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, forEachWith, forEachWithIndex, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, hashCode, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, iterator, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, partitionWith, reject, rejectWith, select, selectWith, size, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableList, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toString, zip, zipWithIndexMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndexMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, entrySet, equals, hashCode, isEmpty, keySet, putIfAbsent, remove, replace, replace, replaceAll, size, valuesMethods inherited from interface org.eclipse.collections.api.map.MapIterable
equals, hashCode, injectIntoKeyValue, parallelStream, spliterator, stream, toStringMethods inherited from interface org.eclipse.collections.api.map.MutableMapIterable
asSynchronized, asUnmodifiable, collect, collectKeysUnique, collectValues, flip, flipUniqueValues, forEach, getOrDefault, newEmpty, putAllMapIterable, reject, select, toImmutable, withAllKeyValueArguments, withAllKeyValues, withKeyValue, withMap, withMapIterable, withoutAllKeys, withoutKeyMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collect, collectBoolean, collectBoolean, collectByte, collectByte, collectChar, collectChar, collectDouble, collectDouble, collectFloat, collectFloat, collectIf, collectIf, collectInt, collectInt, collectLong, collectLong, collectShort, collectShort, collectWith, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, partitionWith, reduce, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndex
-
Method Details
-
get
-
getIfAbsent
- Specified by:
getIfAbsentin interfaceMapIterable<K,V>
-
getIfAbsentValue
- Specified by:
getIfAbsentValuein interfaceMapIterable<K,V>
-
getIfAbsentWith
- Specified by:
getIfAbsentWithin interfaceMapIterable<K,V>
-
ifPresentApply
- Specified by:
ifPresentApplyin interfaceMapIterable<K,V>
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Specified by:
containsKeyin interfaceMapIterable<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V> - Specified by:
containsValuein interfaceMapIterable<K,V>
-
forEachValue
- Specified by:
forEachValuein interfaceMapIterable<K,V>
-
forEachKey
- Specified by:
forEachKeyin interfaceMapIterable<K,V>
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceMapIterable<K,V>
-
detect
- Specified by:
detectin interfaceMapIterable<K,V>
-
detectOptional
- Specified by:
detectOptionalin interfaceMapIterable<K,V>
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableMapIterable<K,V>
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableMapIterable<K,V>
-
getIfAbsentPutWithKey
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableMapIterable<K,V>
-
getIfAbsentPutWith
- Specified by:
getIfAbsentPutWithin interfaceMutableMapIterable<K,V>
-
put
-
remove
-
removeKey
- Specified by:
removeKeyin interfaceMutableMapIterable<K,V>
-
removeAllKeys
- Specified by:
removeAllKeysin interfaceMutableMapIterable<K,V>
-
removeIf
- Specified by:
removeIfin interfaceMutableMapIterable<K,V>
-
putAll
-
clear
public void clear() -
putPair
- Specified by:
putPairin interfaceMutableMapIterable<K,V>
-
add
- Specified by:
addin interfaceMutableMapIterable<K,V>
-
updateValue
public V updateValue(K key, Function0<? extends V> factory, Function<? super V, ? extends V> function) - Specified by:
updateValuein interfaceMutableMapIterable<K,V>
-
updateValueWith
public <P> V updateValueWith(K key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter) - Specified by:
updateValueWithin interfaceMutableMapIterable<K,V>
-
merge
-
groupByUniqueKey
- Specified by:
groupByUniqueKeyin interfaceMutableMapIterable<K,V> - Specified by:
groupByUniqueKeyin interfaceRichIterable<K>- Overrides:
groupByUniqueKeyin classAbstractSynchronizedRichIterable<V>
-
aggregateInPlaceBy
public <KK,VV> MutableMapIterable<KK,VV> aggregateInPlaceBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Procedure2<? super VV, ? super V> mutatingAggregator) - Specified by:
aggregateInPlaceByin interfaceMutableMapIterable<K,V> - Specified by:
aggregateInPlaceByin interfaceRichIterable<K>- Overrides:
aggregateInPlaceByin classAbstractSynchronizedRichIterable<V>
-
aggregateBy
public <KK,VV> MutableMapIterable<KK,VV> aggregateBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Function2<? super VV, ? super V, ? extends VV> nonMutatingAggregator) - Specified by:
aggregateByin interfaceMutableMapIterable<K,V> - Specified by:
aggregateByin interfaceRichIterable<K>- Overrides:
aggregateByin classAbstractSynchronizedRichIterable<V>
-
aggregateBy
public <K1,V1, MutableMapIterable<K1,V2> V2> aggregateBy(Function<? super K, ? extends K1> keyFunction, Function<? super V, ? extends V1> valueFunction, Function0<? extends V2> zeroValueFactory, Function2<? super V2, ? super V1, ? extends V2> nonMutatingAggregator) - Specified by:
aggregateByin interfaceMapIterable<K,V> - Specified by:
aggregateByin interfaceMutableMapIterable<K,V>
-
reduceBy
public <KK> MutableMapIterable<KK,V> reduceBy(Function<? super V, ? extends KK> groupBy, Function2<? super V, ? super V, ? extends V> reduceFunction) - Specified by:
reduceByin interfaceMutableMapIterable<K,V> - Specified by:
reduceByin interfaceRichIterable<K>- Overrides:
reduceByin classAbstractSynchronizedRichIterable<V>
-
keysView
- Specified by:
keysViewin interfaceMapIterable<K,V>
-
valuesView
- Specified by:
valuesViewin interfaceMapIterable<K,V>
-
keyValuesView
- Specified by:
keyValuesViewin interfaceMapIterable<K,V>
-
sumByInt
public <V1> MutableObjectLongMap<V1> sumByInt(Function<? super V, ? extends V1> groupBy, IntFunction<? super V> function) - Specified by:
sumByIntin interfaceMutableMapIterable<K,V> - Specified by:
sumByIntin interfaceRichIterable<K>- Overrides:
sumByIntin classAbstractSynchronizedRichIterable<V>
-
sumByFloat
public <V1> MutableObjectDoubleMap<V1> sumByFloat(Function<? super V, ? extends V1> groupBy, FloatFunction<? super V> function) - Specified by:
sumByFloatin interfaceMutableMapIterable<K,V> - Specified by:
sumByFloatin interfaceRichIterable<K>- Overrides:
sumByFloatin classAbstractSynchronizedRichIterable<V>
-
sumByLong
public <V1> MutableObjectLongMap<V1> sumByLong(Function<? super V, ? extends V1> groupBy, LongFunction<? super V> function) - Specified by:
sumByLongin interfaceMutableMapIterable<K,V> - Specified by:
sumByLongin interfaceRichIterable<K>- Overrides:
sumByLongin classAbstractSynchronizedRichIterable<V>
-
sumByDouble
public <V1> MutableObjectDoubleMap<V1> sumByDouble(Function<? super V, ? extends V1> groupBy, DoubleFunction<? super V> function) - Specified by:
sumByDoublein interfaceMutableMapIterable<K,V> - Specified by:
sumByDoublein interfaceRichIterable<K>- Overrides:
sumByDoublein classAbstractSynchronizedRichIterable<V>
-
groupBy
- Specified by:
groupByin interfaceMutableMapIterable<K,V> - Specified by:
groupByin interfaceRichIterable<K>- Overrides:
groupByin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
groupByEach
- Specified by:
groupByEachin interfaceMutableMapIterable<K,V> - Specified by:
groupByEachin interfaceRichIterable<K>- Overrides:
groupByEachin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
zip
- Specified by:
zipin interfaceMutableMapIterable<K,V> - Specified by:
zipin interfaceRichIterable<K>- Overrides:
zipin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
zipWithIndex
- Specified by:
zipWithIndexin interfaceMutableMapIterable<K,V> - Specified by:
zipWithIndexin interfaceRichIterable<K>- Overrides:
zipWithIndexin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
select
- Specified by:
selectin interfaceMutableMapIterable<K,V> - Specified by:
selectin interfaceRichIterable<K>- Overrides:
selectin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
selectInstancesOf
- Specified by:
selectInstancesOfin interfaceMutableMapIterable<K,V> - Specified by:
selectInstancesOfin interfaceRichIterable<K>- Overrides:
selectInstancesOfin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
selectWith
- Specified by:
selectWithin interfaceMutableMapIterable<K,V> - Specified by:
selectWithin interfaceRichIterable<K>- Overrides:
selectWithin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
rejectWith
- Specified by:
rejectWithin interfaceMutableMapIterable<K,V> - Specified by:
rejectWithin interfaceRichIterable<K>- Overrides:
rejectWithin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
partition
- Specified by:
partitionin interfaceMutableMapIterable<K,V> - Specified by:
partitionin interfaceRichIterable<K>- Overrides:
partitionin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
countBy
- Specified by:
countByin interfaceMutableMapIterable<K,V> - Specified by:
countByin interfaceRichIterable<K>- Overrides:
countByin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
countByWith
public <V1,P> MutableBag<V1> countByWith(Function2<? super V, ? super P, ? extends V1> function, P parameter) - Specified by:
countByWithin interfaceMutableMapIterable<K,V> - Specified by:
countByWithin interfaceRichIterable<K>- Overrides:
countByWithin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
countByEach
- Specified by:
countByEachin interfaceMutableMapIterable<K,V> - Specified by:
countByEachin interfaceRichIterable<K>- Overrides:
countByEachin classAbstractSynchronizedRichIterable<V>- Since:
- 10.0.0
-
reject
- Specified by:
rejectin interfaceMutableMapIterable<K,V> - Specified by:
rejectin interfaceRichIterable<K>- Overrides:
rejectin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-
tap
- Specified by:
tapin interfaceMapIterable<K,V> - Specified by:
tapin interfaceMutableMapIterable<K,V> - Specified by:
tapin interfaceRichIterable<K>- Overrides:
tapin classAbstractSynchronizedRichIterable<V>- Since:
- 9.0
-