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()
V
getIfAbsentPut(K key, Function0<? extends V> function)
V
getIfAbsentPut(K key, V value)
<P> V
getIfAbsentPutWith(K key, Function<? super P,? extends V> function, P parameter)
V
getIfAbsentPutWithKey(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()
<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)
V
updateValue(K key, Function0<? extends V> factory, Function<? super V,? extends V> function)
<P> V
updateValueWith(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, 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, 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:
getIfAbsentPut
in interfaceMutableMapIterable<K,V>
-
getIfAbsentPut
public V getIfAbsentPut(K key, V value)
- Specified by:
getIfAbsentPut
in interfaceMutableMapIterable<K,V>
-
getIfAbsentPutWithKey
public V getIfAbsentPutWithKey(K key, Function<? super K,? extends V> function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableMapIterable<K,V>
-
getIfAbsentPutWith
public <P> V getIfAbsentPutWith(K key, Function<? super P,? extends V> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableMapIterable<K,V>
-
updateValue
public V updateValue(K key, Function0<? extends V> factory, Function<? super V,? extends V> function)
- Specified by:
updateValue
in 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:
updateValueWith
in interfaceMutableMapIterable<K,V>
-
groupByUniqueKey
public <VV> MutableMapIterable<VV,V> groupByUniqueKey(Function<? super V,? extends VV> function)
- Specified by:
groupByUniqueKey
in interfaceMutableMapIterable<K,V>
- Specified by:
groupByUniqueKey
in 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:
aggregateBy
in interfaceMapIterable<K,V>
- Specified by:
aggregateBy
in interfaceMutableMapIterable<K,V>
-
keysView
public RichIterable<K> keysView()
- Specified by:
keysView
in interfaceMapIterable<K,V>
-
valuesView
public RichIterable<V> valuesView()
- Specified by:
valuesView
in interfaceMapIterable<K,V>
-
keyValuesView
public RichIterable<Pair<K,V>> keyValuesView()
- Specified by:
keyValuesView
in interfaceMapIterable<K,V>
-
collect
public <K2,V2> MutableMap<K2,V2> collect(Function2<? super K,? super V,Pair<K2,V2>> function)
- Specified by:
collect
in interfaceMapIterable<K,V>
- Specified by:
collect
in interfaceMutableMapIterable<K,V>
-
flipUniqueValues
public MutableMap<V,K> flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceMapIterable<K,V>
- Specified by:
flipUniqueValues
in interfaceMutableMapIterable<K,V>
-
detect
public Pair<K,V> detect(Predicate2<? super K,? super V> predicate)
- Specified by:
detect
in interfaceMapIterable<K,V>
-
detectOptional
public Optional<Pair<K,V>> detectOptional(Predicate2<? super K,? super V> predicate)
- Specified by:
detectOptional
in interfaceMapIterable<K,V>
-
sumByInt
public <V1> MutableObjectLongMap<V1> sumByInt(Function<? super V,? extends V1> groupBy, IntFunction<? super V> function)
- Specified by:
sumByInt
in interfaceMutableMapIterable<K,V>
- Specified by:
sumByInt
in interfaceRichIterable<K>
-
sumByFloat
public <V1> MutableObjectDoubleMap<V1> sumByFloat(Function<? super V,? extends V1> groupBy, FloatFunction<? super V> function)
- Specified by:
sumByFloat
in interfaceMutableMapIterable<K,V>
- Specified by:
sumByFloat
in interfaceRichIterable<K>
-
sumByLong
public <V1> MutableObjectLongMap<V1> sumByLong(Function<? super V,? extends V1> groupBy, LongFunction<? super V> function)
- Specified by:
sumByLong
in interfaceMutableMapIterable<K,V>
- Specified by:
sumByLong
in interfaceRichIterable<K>
-
sumByDouble
public <V1> MutableObjectDoubleMap<V1> sumByDouble(Function<? super V,? extends V1> groupBy, DoubleFunction<? super V> function)
- Specified by:
sumByDouble
in interfaceMutableMapIterable<K,V>
- Specified by:
sumByDouble
in interfaceRichIterable<K>
-
countBy
public <V1> MutableBag<V1> countBy(Function<? super V,? extends V1> function)
- Specified by:
countBy
in interfaceMutableMapIterable<K,V>
- Specified by:
countBy
in interfaceRichIterable<K>
- Since:
- 9.0
-
countByWith
public <V1,P> MutableBag<V1> countByWith(Function2<? super V,? super P,? extends V1> function, P parameter)
- Specified by:
countByWith
in interfaceMutableMapIterable<K,V>
- Specified by:
countByWith
in interfaceRichIterable<K>
- Since:
- 9.0
-
countByEach
public <V1> MutableBag<V1> countByEach(Function<? super V,? extends Iterable<V1>> function)
- Specified by:
countByEach
in interfaceMutableMapIterable<K,V>
- Specified by:
countByEach
in interfaceRichIterable<K>
- Overrides:
countByEach
in classAbstractRichIterable<V>
- Since:
- 10.0.0
-
-