Class AbstractMutableMap<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>
org.eclipse.collections.impl.map.mutable.AbstractMutableMap<K,V>
- All Implemented Interfaces:
Cloneable,Iterable<V>,Map<K,,V> InternalIterable<V>,MapIterable<K,,V> MutableMap<K,,V> MutableMapIterable<K,,V> UnsortedMapIterable<K,,V> RichIterable<V>
- Direct Known Subclasses:
ConcurrentHashMap,ConcurrentHashMapUnsafe,ConcurrentMutableHashMap,MapAdapter,UnifiedMap,UnifiedMapWithHashingStrategy
public abstract class AbstractMutableMap<K,V>
extends AbstractMutableMapIterable<K,V>
implements MutableMap<K,V>
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMutableMap<K,V> MutableMap<K,V> abstract MutableMap<K,V> clone()<R> MutableBag<R>collectBoolean(BooleanFunction<? super V> booleanFunction) collectByte(ByteFunction<? super V> byteFunction) collectChar(CharFunction<? super V> charFunction) collectDouble(DoubleFunction<? super V> doubleFunction) collectFloat(FloatFunction<? super V> floatFunction) <R> MutableBag<R>collectInt(IntFunction<? super V> intFunction) <R> MutableMap<R,V> collectKeysUnique(Function2<? super K, ? super V, ? extends R> function) collectLong(LongFunction<? super V> longFunction) collectShort(ShortFunction<? super V> shortFunction) <R> MutableMap<K,R> collectValues(Function2<? super K, ? super V, ? extends R> function) <P,VV> MutableBag<VV> collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter) <R> MutableBag<R>flatCollect(Function<? super V, ? extends Iterable<R>> function) flip()<VV> MutableBagMultimap<VV,V> <VV> MutableBagMultimap<VV,V> groupByEach(Function<? super V, ? extends Iterable<VV>> function) <VV> MutableMap<VV,V> groupByUniqueKey(Function<? super V, ? extends VV> function) abstract <K,V> MutableMap<K, V> newEmpty(int capacity) Creates a new instance of the same type, using the given capacity and the default growth parameters.<P> PartitionMutableBag<V>partitionWith(Predicate2<? super V, ? super P> predicate, P parameter) MutableMap<K,V> reject(Predicate2<? super K, ? super V> predicate) <P> MutableBag<V>rejectWith(Predicate2<? super V, ? super P> predicate, P parameter) voidreplaceAll(BiFunction<? super K, ? super V, ? extends V> function) MutableMap<K,V> select(Predicate2<? super K, ? super V> predicate) <S> MutableBag<S>selectInstancesOf(Class<S> clazz) <P> MutableBag<V>selectWith(Predicate2<? super V, ? super P> predicate, P parameter) MutableMap<K,V> MutableMap<K,V> withAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValues) MutableMap<K,V> withAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues) MutableMap<K,V> withKeyValue(K key, V value) MutableMap<K,V> withoutAllKeys(Iterable<? extends K> keys) MutableMap<K,V> withoutKey(K key) <S> MutableBag<Pair<V,S>> Deprecated.in 6.0.Deprecated.in 6.0.Methods inherited from class org.eclipse.collections.impl.map.mutable.AbstractMutableMapIterable
aggregateBy, collect, countBy, countByEach, countByWith, detect, detectOptional, flipUniqueValues, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, iterator, keysView, keyValuesView, reduceBy, sumByDouble, sumByFloat, sumByInt, sumByLong, updateValue, updateValueWith, valuesViewMethods 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, toArrayMethods 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, zipWithIndexMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndexMethods 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, size, valuesMethods inherited from interface org.eclipse.collections.api.map.MapIterable
containsKey, containsValue, detect, detectOptional, equals, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getIfAbsentValue, getIfAbsentWith, hashCode, ifPresentApply, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, toString, valuesViewMethods inherited from interface org.eclipse.collections.api.map.MutableMap
aggregateBy, aggregateBy, aggregateInPlaceBy, collect, collectKeysAndValues, flatCollectWith, flipUniqueValues, newEmpty, reduceBy, withMap, withMapIterableMethods inherited from interface org.eclipse.collections.api.map.MutableMapIterable
add, countBy, countByEach, countByWith, forEach, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, getOrDefault, putAllMapIterable, putPair, removeAllKeys, removeIf, removeKey, sumByDouble, sumByFloat, sumByInt, sumByLong, updateValue, updateValueWithMethods 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, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, 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, 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, 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
-
Constructor Details
-
AbstractMutableMap
public AbstractMutableMap()
-
-
Method Details
-
clone
- Specified by:
clonein interfaceMutableMap<K,V>
-
newEmpty
Creates a new instance of the same type, using the given capacity and the default growth parameters. -
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableMap<K,V> - Specified by:
asUnmodifiablein interfaceMutableMapIterable<K,V>
-
toImmutable
- Specified by:
toImmutablein interfaceMapIterable<K,V> - Specified by:
toImmutablein interfaceMutableMapIterable<K,V> - Specified by:
toImmutablein interfaceUnsortedMapIterable<K,V>
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableMap<K,V> - Specified by:
asSynchronizedin interfaceMutableMapIterable<K,V>
-
flip
- Specified by:
flipin interfaceMapIterable<K,V> - Specified by:
flipin interfaceMutableMap<K,V> - Specified by:
flipin interfaceMutableMapIterable<K,V> - Specified by:
flipin interfaceUnsortedMapIterable<K,V>
-
collectValues
- Specified by:
collectValuesin interfaceMapIterable<K,V> - Specified by:
collectValuesin interfaceMutableMap<K,V> - Specified by:
collectValuesin interfaceMutableMapIterable<K,V> - Specified by:
collectValuesin interfaceUnsortedMapIterable<K,V>
-
collectKeysUnique
- Specified by:
collectKeysUniquein interfaceMapIterable<K,V> - Specified by:
collectKeysUniquein interfaceMutableMap<K,V> - Specified by:
collectKeysUniquein interfaceMutableMapIterable<K,V>
-
select
- Specified by:
selectin interfaceMapIterable<K,V> - Specified by:
selectin interfaceMutableMap<K,V> - Specified by:
selectin interfaceMutableMapIterable<K,V> - Specified by:
selectin interfaceUnsortedMapIterable<K,V>
-
reject
- Specified by:
rejectin interfaceMapIterable<K,V> - Specified by:
rejectin interfaceMutableMap<K,V> - Specified by:
rejectin interfaceMutableMapIterable<K,V> - Specified by:
rejectin interfaceUnsortedMapIterable<K,V>
-
collect
- Specified by:
collectin interfaceMutableMap<K,V> - Specified by:
collectin interfaceRichIterable<K>- Specified by:
collectin interfaceUnsortedMapIterable<K,V>
-
collectBoolean
- Specified by:
collectBooleanin interfaceMutableMap<K,V> - Specified by:
collectBooleanin interfaceRichIterable<K>- Specified by:
collectBooleanin interfaceUnsortedMapIterable<K,V>
-
collectByte
- Specified by:
collectBytein interfaceMutableMap<K,V> - Specified by:
collectBytein interfaceRichIterable<K>- Specified by:
collectBytein interfaceUnsortedMapIterable<K,V>
-
collectChar
- Specified by:
collectCharin interfaceMutableMap<K,V> - Specified by:
collectCharin interfaceRichIterable<K>- Specified by:
collectCharin interfaceUnsortedMapIterable<K,V>
-
collectDouble
- Specified by:
collectDoublein interfaceMutableMap<K,V> - Specified by:
collectDoublein interfaceRichIterable<K>- Specified by:
collectDoublein interfaceUnsortedMapIterable<K,V>
-
collectFloat
- Specified by:
collectFloatin interfaceMutableMap<K,V> - Specified by:
collectFloatin interfaceRichIterable<K>- Specified by:
collectFloatin interfaceUnsortedMapIterable<K,V>
-
collectInt
- Specified by:
collectIntin interfaceMutableMap<K,V> - Specified by:
collectIntin interfaceRichIterable<K>- Specified by:
collectIntin interfaceUnsortedMapIterable<K,V>
-
collectLong
- Specified by:
collectLongin interfaceMutableMap<K,V> - Specified by:
collectLongin interfaceRichIterable<K>- Specified by:
collectLongin interfaceUnsortedMapIterable<K,V>
-
collectShort
- Specified by:
collectShortin interfaceMutableMap<K,V> - Specified by:
collectShortin interfaceRichIterable<K>- Specified by:
collectShortin interfaceUnsortedMapIterable<K,V>
-
collectWith
public <P,VV> MutableBag<VV> collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter) - Specified by:
collectWithin interfaceMutableMap<K,V> - Specified by:
collectWithin interfaceRichIterable<K>- Specified by:
collectWithin interfaceUnsortedMapIterable<K,V>
-
collectIf
public <R> MutableBag<R> collectIf(Predicate<? super V> predicate, Function<? super V, ? extends R> function) - Specified by:
collectIfin interfaceMutableMap<K,V> - Specified by:
collectIfin interfaceRichIterable<K>- Specified by:
collectIfin interfaceUnsortedMapIterable<K,V>
-
flatCollect
- Specified by:
flatCollectin interfaceMutableMap<K,V> - Specified by:
flatCollectin interfaceRichIterable<K>- Specified by:
flatCollectin interfaceUnsortedMapIterable<K,V>
-
select
- Specified by:
selectin interfaceMutableMap<K,V> - Specified by:
selectin interfaceMutableMapIterable<K,V> - Specified by:
selectin interfaceRichIterable<K>- Specified by:
selectin interfaceUnsortedMapIterable<K,V>
-
tap
- Specified by:
tapin interfaceMapIterable<K,V> - Specified by:
tapin interfaceMutableMap<K,V> - Specified by:
tapin interfaceMutableMapIterable<K,V> - Specified by:
tapin interfaceRichIterable<K>- Specified by:
tapin interfaceUnsortedMapIterable<K,V>
-
selectWith
- Specified by:
selectWithin interfaceMutableMap<K,V> - Specified by:
selectWithin interfaceMutableMapIterable<K,V> - Specified by:
selectWithin interfaceRichIterable<K>- Specified by:
selectWithin interfaceUnsortedMapIterable<K,V>
-
reject
- Specified by:
rejectin interfaceMutableMap<K,V> - Specified by:
rejectin interfaceMutableMapIterable<K,V> - Specified by:
rejectin interfaceRichIterable<K>- Specified by:
rejectin interfaceUnsortedMapIterable<K,V>
-
rejectWith
- Specified by:
rejectWithin interfaceMutableMap<K,V> - Specified by:
rejectWithin interfaceMutableMapIterable<K,V> - Specified by:
rejectWithin interfaceRichIterable<K>- Specified by:
rejectWithin interfaceUnsortedMapIterable<K,V>
-
partition
- Specified by:
partitionin interfaceMutableMap<K,V> - Specified by:
partitionin interfaceMutableMapIterable<K,V> - Specified by:
partitionin interfaceRichIterable<K>- Specified by:
partitionin interfaceUnsortedMapIterable<K,V>
-
partitionWith
public <P> PartitionMutableBag<V> partitionWith(Predicate2<? super V, ? super P> predicate, P parameter) - Specified by:
partitionWithin interfaceMutableMap<K,V> - Specified by:
partitionWithin interfaceRichIterable<K>- Specified by:
partitionWithin interfaceUnsortedMapIterable<K,V>
-
selectInstancesOf
- Specified by:
selectInstancesOfin interfaceMutableMap<K,V> - Specified by:
selectInstancesOfin interfaceMutableMapIterable<K,V> - Specified by:
selectInstancesOfin interfaceRichIterable<K>- Specified by:
selectInstancesOfin interfaceUnsortedMapIterable<K,V>
-
zip
Deprecated.in 6.0. UseOrderedIterable.zip(Iterable)instead.- Specified by:
zipin interfaceMutableMap<K,V> - Specified by:
zipin interfaceMutableMapIterable<K,V> - Specified by:
zipin interfaceRichIterable<K>- Specified by:
zipin interfaceUnsortedMapIterable<K,V>
-
zipWithIndex
Deprecated.in 6.0. UseOrderedIterable.zipWithIndex()instead.- Specified by:
zipWithIndexin interfaceMutableMap<K,V> - Specified by:
zipWithIndexin interfaceMutableMapIterable<K,V> - Specified by:
zipWithIndexin interfaceRichIterable<K>- Specified by:
zipWithIndexin interfaceUnsortedMapIterable<K,V>
-
withKeyValue
- Specified by:
withKeyValuein interfaceMutableMap<K,V> - Specified by:
withKeyValuein interfaceMutableMapIterable<K,V>
-
withAllKeyValues
public MutableMap<K,V> withAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues) - Specified by:
withAllKeyValuesin interfaceMutableMap<K,V> - Specified by:
withAllKeyValuesin interfaceMutableMapIterable<K,V>
-
withAllKeyValueArguments
- Specified by:
withAllKeyValueArgumentsin interfaceMutableMap<K,V> - Specified by:
withAllKeyValueArgumentsin interfaceMutableMapIterable<K,V>
-
withoutKey
- Specified by:
withoutKeyin interfaceMutableMap<K,V> - Specified by:
withoutKeyin interfaceMutableMapIterable<K,V>
-
withoutAllKeys
- Specified by:
withoutAllKeysin interfaceMutableMap<K,V> - Specified by:
withoutAllKeysin interfaceMutableMapIterable<K,V>
-
groupBy
- Specified by:
groupByin interfaceMutableMap<K,V> - Specified by:
groupByin interfaceMutableMapIterable<K,V> - Specified by:
groupByin interfaceRichIterable<K>- Specified by:
groupByin interfaceUnsortedMapIterable<K,V>
-
groupByEach
public <VV> MutableBagMultimap<VV,V> groupByEach(Function<? super V, ? extends Iterable<VV>> function) - Specified by:
groupByEachin interfaceMutableMap<K,V> - Specified by:
groupByEachin interfaceMutableMapIterable<K,V> - Specified by:
groupByEachin interfaceRichIterable<K>- Specified by:
groupByEachin interfaceUnsortedMapIterable<K,V>
-
groupByUniqueKey
- Specified by:
groupByUniqueKeyin interfaceMutableMap<K,V> - Specified by:
groupByUniqueKeyin interfaceMutableMapIterable<K,V> - Specified by:
groupByUniqueKeyin interfaceRichIterable<K>- Specified by:
groupByUniqueKeyin interfaceUnsortedMapIterable<K,V> - Overrides:
groupByUniqueKeyin classAbstractMutableMapIterable<K,V>
-
replaceAll
- Specified by:
replaceAllin interfaceMap<K,V>
-