Class AbstractMutableMapIterable<K,V>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<V>
-
- org.eclipse.collections.impl.map.AbstractMapIterable<K,V>
-
- org.eclipse.collections.impl.map.mutable.AbstractMutableMapIterable<K,V>
-
- All Implemented Interfaces:
Iterable<V>,Map<K,V>,InternalIterable<V>,MapIterable<K,V>,MutableMapIterable<K,V>,RichIterable<V>
- Direct Known Subclasses:
AbstractMutableMap,AbstractMutableSortedMap
public abstract class AbstractMutableMapIterable<K,V> extends AbstractMapIterable<K,V> implements MutableMapIterable<K,V>
-
-
Constructor Summary
Constructors Constructor Description AbstractMutableMapIterable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K1,V1,V2>
MutableMap<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)<K2,V2>
MutableMap<K2,V2>collect(Function2<? super K,? super V,Pair<K2,V2>> function)<V1> MutableBag<V1>countBy(Function<? super V,? extends V1> function)<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)Pair<K,V>detect(Predicate2<? super K,? super V> predicate)Optional<Pair<K,V>>detectOptional(Predicate2<? super K,? super V> predicate)MutableMap<V,K>flipUniqueValues()VgetIfAbsentPut(K key, Function0<? extends V> function)VgetIfAbsentPut(K key, V value)<P> VgetIfAbsentPutWith(K key, Function<? super P,? extends V> function, P parameter)VgetIfAbsentPutWithKey(K key, Function<? super K,? extends V> function)<VV> MutableMapIterable<VV,V>groupByUniqueKey(Function<? super V,? extends VV> function)Iterator<V>iterator()RichIterable<K>keysView()RichIterable<Pair<K,V>>keyValuesView()<KK> MutableMap<KK,V>reduceBy(Function<? super V,? extends KK> groupBy, Function2<? super V,? super V,? extends V> reduceFunction)<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)VupdateValue(K key, Function0<? extends V> factory, Function<? super V,? extends V> function)<P> VupdateValueWith(K key, Function0<? extends V> factory, Function2<? super V,? super P,? extends V> function, P parameter)RichIterable<V>valuesView()-
Methods inherited from class org.eclipse.collections.impl.map.AbstractMapIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asLazy, chunk, contains, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, forEachKey, forEachValue, forEachWith, forEachWithIndex, getFirst, getIfAbsent, getIfAbsentValue, getIfAbsentWith, getLast, getOnly, getOrDefault, ifPresentApply, noneSatisfy, noneSatisfyWith, toArray, toArray
-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
appendString, appendString, collect, collectIf, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, max, max, maxBy, min, min, minBy, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndex
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from interface org.eclipse.collections.api.map.MapIterable
containsKey, containsValue, equals, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getIfAbsentValue, getIfAbsentWith, hashCode, ifPresentApply, injectIntoKeyValue, parallelStream, spliterator, stream, toString
-
Methods inherited from interface org.eclipse.collections.api.map.MutableMapIterable
add, aggregateBy, aggregateInPlaceBy, asSynchronized, asUnmodifiable, collectKeysUnique, collectValues, flip, forEach, getOrDefault, groupBy, groupByEach, newEmpty, partition, putAllMapIterable, putPair, reject, reject, rejectWith, removeAllKeys, removeIf, removeKey, select, select, selectInstancesOf, selectWith, tap, toImmutable, withAllKeyValueArguments, withAllKeyValues, withKeyValue, withMap, withMapIterable, withoutAllKeys, withoutKey, zip, zipWithIndex
-
Methods 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 Detail
-
getIfAbsentPut
public V getIfAbsentPut(K key, Function0<? extends V> function)
- Specified by:
getIfAbsentPutin interfaceMutableMapIterable<K,V>
-
getIfAbsentPut
public V getIfAbsentPut(K key, V value)
- Specified by:
getIfAbsentPutin interfaceMutableMapIterable<K,V>
-
getIfAbsentPutWithKey
public V getIfAbsentPutWithKey(K key, Function<? super K,? extends V> function)
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableMapIterable<K,V>
-
getIfAbsentPutWith
public <P> V getIfAbsentPutWith(K key, Function<? super P,? extends V> function, P parameter)
- Specified by:
getIfAbsentPutWithin 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>
-
groupByUniqueKey
public <VV> MutableMapIterable<VV,V> groupByUniqueKey(Function<? super V,? extends VV> function)
- Specified by:
groupByUniqueKeyin interfaceMutableMapIterable<K,V>- Specified by:
groupByUniqueKeyin interfaceRichIterable<K>
-
aggregateBy
public <K1,V1,V2> MutableMap<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)
- Specified by:
aggregateByin interfaceMapIterable<K,V>- Specified by:
aggregateByin interfaceMutableMapIterable<K,V>
-
reduceBy
public <KK> MutableMap<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>
-
keysView
public RichIterable<K> keysView()
- Specified by:
keysViewin interfaceMapIterable<K,V>
-
valuesView
public RichIterable<V> valuesView()
- Specified by:
valuesViewin interfaceMapIterable<K,V>
-
keyValuesView
public RichIterable<Pair<K,V>> keyValuesView()
- Specified by:
keyValuesViewin interfaceMapIterable<K,V>
-
collect
public <K2,V2> MutableMap<K2,V2> collect(Function2<? super K,? super V,Pair<K2,V2>> function)
- Specified by:
collectin interfaceMapIterable<K,V>- Specified by:
collectin interfaceMutableMapIterable<K,V>
-
flipUniqueValues
public MutableMap<V,K> flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMapIterable<K,V>- Specified by:
flipUniqueValuesin interfaceMutableMapIterable<K,V>
-
detect
public Pair<K,V> detect(Predicate2<? super K,? super V> predicate)
- Specified by:
detectin interfaceMapIterable<K,V>
-
detectOptional
public Optional<Pair<K,V>> detectOptional(Predicate2<? super K,? super V> predicate)
- Specified by:
detectOptionalin 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>
-
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>
-
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>
-
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>
-
countBy
public <V1> MutableBag<V1> countBy(Function<? super V,? extends V1> function)
- Specified by:
countByin interfaceMutableMapIterable<K,V>- Specified by:
countByin interfaceRichIterable<K>- 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>- Since:
- 9.0
-
countByEach
public <V1> MutableBag<V1> countByEach(Function<? super V,? extends Iterable<V1>> function)
- Specified by:
countByEachin interfaceMutableMapIterable<K,V>- Specified by:
countByEachin interfaceRichIterable<K>- Overrides:
countByEachin classAbstractRichIterable<V>- Since:
- 10.0.0
-
-