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>
-
-
Constructor Summary
Constructors Constructor Description AbstractMutableMap()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MutableMap<K,V>asSynchronized()MutableMap<K,V>asUnmodifiable()abstract MutableMap<K,V>clone()<R> MutableBag<R>collect(Function<? super V,? extends R> function)MutableBooleanBagcollectBoolean(BooleanFunction<? super V> booleanFunction)MutableByteBagcollectByte(ByteFunction<? super V> byteFunction)MutableCharBagcollectChar(CharFunction<? super V> charFunction)MutableDoubleBagcollectDouble(DoubleFunction<? super V> doubleFunction)MutableFloatBagcollectFloat(FloatFunction<? super V> floatFunction)<R> MutableBag<R>collectIf(Predicate<? super V> predicate, Function<? super V,? extends R> function)MutableIntBagcollectInt(IntFunction<? super V> intFunction)MutableLongBagcollectLong(LongFunction<? super V> longFunction)MutableShortBagcollectShort(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)MutableSetMultimap<V,K>flip()<VV> MutableBagMultimap<VV,V>groupBy(Function<? super V,? extends VV> function)<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.PartitionMutableBag<V>partition(Predicate<? super V> predicate)<P> PartitionMutableBag<V>partitionWith(Predicate2<? super V,? super P> predicate, P parameter)MutableBag<V>reject(Predicate<? super V> predicate)MutableMap<K,V>reject(Predicate2<? super K,? super V> predicate)<P> MutableBag<V>rejectWith(Predicate2<? super V,? super P> predicate, P parameter)MutableBag<V>select(Predicate<? super V> predicate)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>tap(Procedure<? super V> procedure)ImmutableMap<K,V>toImmutable()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>>zip(Iterable<S> that)Deprecated.in 6.0.MutableSet<Pair<V,Integer>>zipWithIndex()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, sumByDouble, sumByFloat, sumByInt, sumByLong, updateValue, updateValueWith, 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, detect, detectOptional, equals, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getIfAbsentValue, getIfAbsentWith, hashCode, ifPresentApply, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, toString, valuesView
-
Methods inherited from interface org.eclipse.collections.api.map.MutableMap
aggregateBy, aggregateBy, aggregateInPlaceBy, collect, collectKeysAndValues, flatCollectWith, flipUniqueValues, newEmpty, withMap, withMapIterable
-
Methods 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, 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, 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, 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
-
clone
public abstract MutableMap<K,V> clone()
- Specified by:
clonein interfaceMutableMap<K,V>
-
newEmpty
public 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.
-
asUnmodifiable
public MutableMap<K,V> asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableMap<K,V>- Specified by:
asUnmodifiablein interfaceMutableMapIterable<K,V>
-
toImmutable
public ImmutableMap<K,V> toImmutable()
- Specified by:
toImmutablein interfaceMapIterable<K,V>- Specified by:
toImmutablein interfaceMutableMapIterable<K,V>- Specified by:
toImmutablein interfaceUnsortedMapIterable<K,V>
-
asSynchronized
public MutableMap<K,V> asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableMap<K,V>- Specified by:
asSynchronizedin interfaceMutableMapIterable<K,V>
-
flip
public MutableSetMultimap<V,K> 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
public <R> MutableMap<K,R> collectValues(Function2<? super K,? super V,? extends R> function)
- Specified by:
collectValuesin interfaceMapIterable<K,V>- Specified by:
collectValuesin interfaceMutableMap<K,V>- Specified by:
collectValuesin interfaceMutableMapIterable<K,V>- Specified by:
collectValuesin interfaceUnsortedMapIterable<K,V>
-
select
public MutableMap<K,V> select(Predicate2<? super K,? super V> predicate)
- 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
public MutableMap<K,V> reject(Predicate2<? super K,? super V> predicate)
- 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
public <R> MutableBag<R> collect(Function<? super V,? extends R> function)
- Specified by:
collectin interfaceMutableMap<K,V>- Specified by:
collectin interfaceRichIterable<K>- Specified by:
collectin interfaceUnsortedMapIterable<K,V>
-
collectBoolean
public MutableBooleanBag collectBoolean(BooleanFunction<? super V> booleanFunction)
- Specified by:
collectBooleanin interfaceMutableMap<K,V>- Specified by:
collectBooleanin interfaceRichIterable<K>- Specified by:
collectBooleanin interfaceUnsortedMapIterable<K,V>
-
collectByte
public MutableByteBag collectByte(ByteFunction<? super V> byteFunction)
- Specified by:
collectBytein interfaceMutableMap<K,V>- Specified by:
collectBytein interfaceRichIterable<K>- Specified by:
collectBytein interfaceUnsortedMapIterable<K,V>
-
collectChar
public MutableCharBag collectChar(CharFunction<? super V> charFunction)
- Specified by:
collectCharin interfaceMutableMap<K,V>- Specified by:
collectCharin interfaceRichIterable<K>- Specified by:
collectCharin interfaceUnsortedMapIterable<K,V>
-
collectDouble
public MutableDoubleBag collectDouble(DoubleFunction<? super V> doubleFunction)
- Specified by:
collectDoublein interfaceMutableMap<K,V>- Specified by:
collectDoublein interfaceRichIterable<K>- Specified by:
collectDoublein interfaceUnsortedMapIterable<K,V>
-
collectFloat
public MutableFloatBag collectFloat(FloatFunction<? super V> floatFunction)
- Specified by:
collectFloatin interfaceMutableMap<K,V>- Specified by:
collectFloatin interfaceRichIterable<K>- Specified by:
collectFloatin interfaceUnsortedMapIterable<K,V>
-
collectInt
public MutableIntBag collectInt(IntFunction<? super V> intFunction)
- Specified by:
collectIntin interfaceMutableMap<K,V>- Specified by:
collectIntin interfaceRichIterable<K>- Specified by:
collectIntin interfaceUnsortedMapIterable<K,V>
-
collectLong
public MutableLongBag collectLong(LongFunction<? super V> longFunction)
- Specified by:
collectLongin interfaceMutableMap<K,V>- Specified by:
collectLongin interfaceRichIterable<K>- Specified by:
collectLongin interfaceUnsortedMapIterable<K,V>
-
collectShort
public MutableShortBag collectShort(ShortFunction<? super V> shortFunction)
- 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
public <R> MutableBag<R> flatCollect(Function<? super V,? extends Iterable<R>> function)
- Specified by:
flatCollectin interfaceMutableMap<K,V>- Specified by:
flatCollectin interfaceRichIterable<K>- Specified by:
flatCollectin interfaceUnsortedMapIterable<K,V>
-
select
public MutableBag<V> select(Predicate<? super V> predicate)
- Specified by:
selectin interfaceMutableMap<K,V>- Specified by:
selectin interfaceMutableMapIterable<K,V>- Specified by:
selectin interfaceRichIterable<K>- Specified by:
selectin interfaceUnsortedMapIterable<K,V>
-
tap
public MutableMap<K,V> tap(Procedure<? super V> procedure)
- 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
public <P> MutableBag<V> selectWith(Predicate2<? super V,? super P> predicate, P parameter)
- Specified by:
selectWithin interfaceMutableMap<K,V>- Specified by:
selectWithin interfaceMutableMapIterable<K,V>- Specified by:
selectWithin interfaceRichIterable<K>- Specified by:
selectWithin interfaceUnsortedMapIterable<K,V>
-
reject
public MutableBag<V> reject(Predicate<? super V> predicate)
- Specified by:
rejectin interfaceMutableMap<K,V>- Specified by:
rejectin interfaceMutableMapIterable<K,V>- Specified by:
rejectin interfaceRichIterable<K>- Specified by:
rejectin interfaceUnsortedMapIterable<K,V>
-
rejectWith
public <P> MutableBag<V> rejectWith(Predicate2<? super V,? super P> predicate, P parameter)
- Specified by:
rejectWithin interfaceMutableMap<K,V>- Specified by:
rejectWithin interfaceMutableMapIterable<K,V>- Specified by:
rejectWithin interfaceRichIterable<K>- Specified by:
rejectWithin interfaceUnsortedMapIterable<K,V>
-
partition
public PartitionMutableBag<V> partition(Predicate<? super V> predicate)
- 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
public <S> MutableBag<S> selectInstancesOf(Class<S> clazz)
- 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 public <S> MutableBag<Pair<V,S>> zip(Iterable<S> that)
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 public MutableSet<Pair<V,Integer>> 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
public MutableMap<K,V> withKeyValue(K key, V value)
- 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
public MutableMap<K,V> withAllKeyValueArguments(Pair<? extends K,? extends V>... keyValues)
- Specified by:
withAllKeyValueArgumentsin interfaceMutableMap<K,V>- Specified by:
withAllKeyValueArgumentsin interfaceMutableMapIterable<K,V>
-
withoutKey
public MutableMap<K,V> withoutKey(K key)
- Specified by:
withoutKeyin interfaceMutableMap<K,V>- Specified by:
withoutKeyin interfaceMutableMapIterable<K,V>
-
withoutAllKeys
public MutableMap<K,V> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeysin interfaceMutableMap<K,V>- Specified by:
withoutAllKeysin interfaceMutableMapIterable<K,V>
-
groupBy
public <VV> MutableBagMultimap<VV,V> groupBy(Function<? super V,? extends VV> function)
- 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
public <VV> MutableMap<VV,V> groupByUniqueKey(Function<? super V,? extends VV> function)
- 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>
-
-