Class SynchronizedMutableMap<K,V>
- java.lang.Object
-
- org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable<V>
-
- org.eclipse.collections.impl.map.AbstractSynchronizedMapIterable<K,V>
-
- org.eclipse.collections.impl.map.mutable.SynchronizedMutableMap<K,V>
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<V>,Map<K,V>,InternalIterable<V>,MapIterable<K,V>,MutableMap<K,V>,MutableMapIterable<K,V>,UnsortedMapIterable<K,V>,RichIterable<V>
public class SynchronizedMutableMap<K,V> extends AbstractSynchronizedMapIterable<K,V> implements MutableMap<K,V>, Serializable
A synchronized view of aMutableMap. It is imperative that the user manually synchronize on the collection when iterating over it using the standard JDK iterator or JDK 5 for loop, as perCollections.synchronizedCollection(Collection).- See Also:
MutableMap.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedMutableMap(MutableMap<K,V> newMap)SynchronizedMutableMap(MutableMap<K,V> newMap, Object newLock)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated 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)<KK,VV>
MutableMap<KK,VV>aggregateBy(Function<? super V,? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Function2<? super VV,? super V,? extends VV> nonMutatingAggregator)MutableMap<K,V>asSynchronized()MutableMap<K,V>asUnmodifiable()MutableMap<K,V>clone()<A> MutableBag<A>collect(Function<? super V,? extends A> function)<K2,V2>
MutableMap<K2,V2>collect(Function2<? super K,? super V,Pair<K2,V2>> pairFunction)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)<A> MutableBag<A>collectIf(Predicate<? super V> predicate, Function<? super V,? extends A> function)MutableIntBagcollectInt(IntFunction<? super V> intFunction)<E> MutableMap<K,V>collectKeysAndValues(Iterable<E> iterable, Function<? super E,? extends K> keyFunction, Function<? super E,? extends V> function)MutableLongBagcollectLong(LongFunction<? super V> longFunction)MutableShortBagcollectShort(ShortFunction<? super V> shortFunction)<R> MutableMap<K,R>collectValues(Function2<? super K,? super V,? extends R> function)<P,A>
MutableBag<A>collectWith(Function2<? super V,? super P,? extends A> function, P parameter)Set<Map.Entry<K,V>>entrySet()<A> MutableBag<A>flatCollect(Function<? super V,? extends Iterable<A>> function)MutableSetMultimap<V,K>flip()MutableMap<V,K>flipUniqueValues()<KK> MutableBagMultimap<KK,V>groupBy(Function<? super V,? extends KK> function)<KK> MutableBagMultimap<KK,V>groupByEach(Function<? super V,? extends Iterable<KK>> function)<VV> MutableMap<VV,V>groupByUniqueKey(Function<? super V,? extends VV> function)Set<K>keySet()MutableMap<K,V>newEmpty()static <K,V,M extends Map<K,V>>
SynchronizedMutableMap<K,V>of(M map)This method will take a MutableMap and wrap it directly in a SynchronizedMutableMap.static <K,V,M extends Map<K,V>>
SynchronizedMutableMap<K,V>of(M map, Object lock)This method will take a MutableMap and wrap it directly in a SynchronizedMutableMap.PartitionMutableBag<V>partition(Predicate<? super V> predicate)<P> PartitionMutableBag<V>partitionWith(Predicate2<? super V,? super P> predicate, P parameter)voidputAllMapIterable(MapIterable<? extends K,? extends V> mapIterable)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()Collection<V>values()MutableMap<K,V>withAllKeyValueArguments(Pair<? extends K,? extends V>... keyValuePairs)MutableMap<K,V>withAllKeyValues(Iterable<? extends Pair<? extends K,? extends V>> keyValues)MutableMap<K,V>withKeyValue(K key, V value)MutableMap<K,V>withMap(Map<? extends K,? extends V> map)MutableMap<K,V>withMapIterable(MapIterable<? extends K,? extends V> mapIterable)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.AbstractSynchronizedMapIterable
add, aggregateInPlaceBy, clear, containsKey, containsValue, countBy, countByEach, countByWith, detect, detectOptional, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, getIfAbsentValue, getIfAbsentWith, ifPresentApply, keysView, keyValuesView, put, putAll, putPair, remove, removeAllKeys, removeIf, removeKey, sumByDouble, sumByFloat, sumByInt, sumByLong, updateValue, updateValueWith, valuesView
-
Methods inherited from class org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable
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, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, equals, 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, 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, zipWithIndex
-
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, equals, get, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size
-
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
aggregateInPlaceBy, flatCollectWith
-
Methods inherited from interface org.eclipse.collections.api.map.MutableMapIterable
add, countBy, countByEach, countByWith, forEach, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, getOrDefault, 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
-
-
-
-
Constructor Detail
-
SynchronizedMutableMap
public SynchronizedMutableMap(MutableMap<K,V> newMap)
-
SynchronizedMutableMap
public SynchronizedMutableMap(MutableMap<K,V> newMap, Object newLock)
-
-
Method Detail
-
of
public static <K,V,M extends Map<K,V>> SynchronizedMutableMap<K,V> of(M map)
This method will take a MutableMap and wrap it directly in a SynchronizedMutableMap. It will take any other non-Eclipse-Collections map and first adapt it will a MapAdapter, and then return a SynchronizedMutableMap that wraps the adapter.
-
of
public static <K,V,M extends Map<K,V>> SynchronizedMutableMap<K,V> of(M map, Object lock)
This method will take a MutableMap and wrap it directly in a SynchronizedMutableMap. It will take any other non-Eclipse-Collections map and first adapt it will a MapAdapter, and then return a SynchronizedMutableMap that wraps the adapter. Additionally, a developer specifies which lock to use with the collection.
-
withKeyValue
public MutableMap<K,V> withKeyValue(K key, V value)
- Specified by:
withKeyValuein interfaceMutableMap<K,V>- Specified by:
withKeyValuein interfaceMutableMapIterable<K,V>
-
withMap
public MutableMap<K,V> withMap(Map<? extends K,? extends V> map)
- Specified by:
withMapin interfaceMutableMap<K,V>- Specified by:
withMapin interfaceMutableMapIterable<K,V>
-
withMapIterable
public MutableMap<K,V> withMapIterable(MapIterable<? extends K,? extends V> mapIterable)
- Specified by:
withMapIterablein interfaceMutableMap<K,V>- Specified by:
withMapIterablein interfaceMutableMapIterable<K,V>
-
putAllMapIterable
public void putAllMapIterable(MapIterable<? extends K,? extends V> mapIterable)
- Specified by:
putAllMapIterablein interfaceMutableMapIterable<K,V>
-
withAllKeyValueArguments
public MutableMap<K,V> withAllKeyValueArguments(Pair<? extends K,? extends V>... keyValuePairs)
- Specified by:
withAllKeyValueArgumentsin interfaceMutableMap<K,V>- Specified by:
withAllKeyValueArgumentsin 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>
-
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>
-
newEmpty
public MutableMap<K,V> newEmpty()
- Specified by:
newEmptyin interfaceMutableMap<K,V>- Specified by:
newEmptyin interfaceMutableMapIterable<K,V>
-
clone
public MutableMap<K,V> clone()
- Specified by:
clonein interfaceMutableMap<K,V>
-
collectKeysAndValues
public <E> MutableMap<K,V> collectKeysAndValues(Iterable<E> iterable, Function<? super E,? extends K> keyFunction, Function<? super E,? extends V> function)
- Specified by:
collectKeysAndValuesin interfaceMutableMap<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 <K2,V2> MutableMap<K2,V2> collect(Function2<? super K,? super V,Pair<K2,V2>> pairFunction)
- Specified by:
collectin interfaceMapIterable<K,V>- Specified by:
collectin interfaceMutableMap<K,V>- Specified by:
collectin interfaceMutableMapIterable<K,V>- Specified by:
collectin 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>
-
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>- Overrides:
tapin classAbstractSynchronizedMapIterable<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>- Overrides:
selectin classAbstractSynchronizedMapIterable<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>- Overrides:
selectWithin classAbstractSynchronizedMapIterable<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>- Overrides:
rejectin classAbstractSynchronizedMapIterable<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>- Overrides:
rejectWithin classAbstractSynchronizedMapIterable<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>- Overrides:
partitionin classAbstractSynchronizedMapIterable<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>- Overrides:
zipWithIndexin classAbstractSynchronizedMapIterable<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>- Overrides:
partitionWithin classAbstractSynchronizedRichIterable<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>- Overrides:
selectInstancesOfin classAbstractSynchronizedMapIterable<K,V>
-
collect
public <A> MutableBag<A> collect(Function<? super V,? extends A> function)
- Specified by:
collectin interfaceMutableMap<K,V>- Specified by:
collectin interfaceRichIterable<K>- Specified by:
collectin interfaceUnsortedMapIterable<K,V>- Overrides:
collectin classAbstractSynchronizedRichIterable<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>- Overrides:
collectBooleanin classAbstractSynchronizedRichIterable<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>- Overrides:
collectBytein classAbstractSynchronizedRichIterable<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>- Overrides:
collectCharin classAbstractSynchronizedRichIterable<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>- Overrides:
collectDoublein classAbstractSynchronizedRichIterable<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>- Overrides:
collectFloatin classAbstractSynchronizedRichIterable<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>- Overrides:
collectIntin classAbstractSynchronizedRichIterable<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>- Overrides:
collectLongin classAbstractSynchronizedRichIterable<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>- Overrides:
collectShortin classAbstractSynchronizedRichIterable<V>
-
collectWith
public <P,A> MutableBag<A> collectWith(Function2<? super V,? super P,? extends A> function, P parameter)
- Specified by:
collectWithin interfaceMutableMap<K,V>- Specified by:
collectWithin interfaceRichIterable<K>- Specified by:
collectWithin interfaceUnsortedMapIterable<K,V>- Overrides:
collectWithin classAbstractSynchronizedRichIterable<V>
-
collectIf
public <A> MutableBag<A> collectIf(Predicate<? super V> predicate, Function<? super V,? extends A> function)
- Specified by:
collectIfin interfaceMutableMap<K,V>- Specified by:
collectIfin interfaceRichIterable<K>- Specified by:
collectIfin interfaceUnsortedMapIterable<K,V>- Overrides:
collectIfin classAbstractSynchronizedRichIterable<V>
-
flatCollect
public <A> MutableBag<A> flatCollect(Function<? super V,? extends Iterable<A>> function)
- Specified by:
flatCollectin interfaceMutableMap<K,V>- Specified by:
flatCollectin interfaceRichIterable<K>- Specified by:
flatCollectin interfaceUnsortedMapIterable<K,V>- Overrides:
flatCollectin classAbstractSynchronizedRichIterable<V>
-
groupBy
public <KK> MutableBagMultimap<KK,V> groupBy(Function<? super V,? extends KK> function)
- Specified by:
groupByin interfaceMutableMap<K,V>- Specified by:
groupByin interfaceMutableMapIterable<K,V>- Specified by:
groupByin interfaceRichIterable<K>- Specified by:
groupByin interfaceUnsortedMapIterable<K,V>- Overrides:
groupByin classAbstractSynchronizedMapIterable<K,V>
-
groupByEach
public <KK> MutableBagMultimap<KK,V> groupByEach(Function<? super V,? extends Iterable<KK>> function)
- Specified by:
groupByEachin interfaceMutableMap<K,V>- Specified by:
groupByEachin interfaceMutableMapIterable<K,V>- Specified by:
groupByEachin interfaceRichIterable<K>- Specified by:
groupByEachin interfaceUnsortedMapIterable<K,V>- Overrides:
groupByEachin classAbstractSynchronizedMapIterable<K,V>
-
aggregateBy
public <KK,VV> MutableMap<KK,VV> aggregateBy(Function<? super V,? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Function2<? super VV,? super V,? extends VV> nonMutatingAggregator)
- Specified by:
aggregateByin interfaceMutableMap<K,V>- Specified by:
aggregateByin interfaceMutableMapIterable<K,V>- Specified by:
aggregateByin interfaceRichIterable<K>- Overrides:
aggregateByin classAbstractSynchronizedMapIterable<K,V>- Since:
- 11.0
-
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 interfaceMutableMap<K,V>- Specified by:
aggregateByin interfaceMutableMapIterable<K,V>- Overrides:
aggregateByin classAbstractSynchronizedMapIterable<K,V>- Since:
- 11.0
-
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>- Overrides:
zipin classAbstractSynchronizedMapIterable<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 classAbstractSynchronizedMapIterable<K,V>
-
flipUniqueValues
public MutableMap<V,K> flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMapIterable<K,V>- Specified by:
flipUniqueValuesin interfaceMutableMap<K,V>- Specified by:
flipUniqueValuesin interfaceMutableMapIterable<K,V>- Specified by:
flipUniqueValuesin interfaceUnsortedMapIterable<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>
-
asUnmodifiable
public MutableMap<K,V> asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableMap<K,V>- Specified by:
asUnmodifiablein interfaceMutableMapIterable<K,V>
-
asSynchronized
public MutableMap<K,V> asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableMap<K,V>- Specified by:
asSynchronizedin 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>
-
-