Class SynchronizedBiMap<K,V>
java.lang.Object
org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable<V>
org.eclipse.collections.impl.map.AbstractSynchronizedMapIterable<K,V>
org.eclipse.collections.impl.bimap.mutable.SynchronizedBiMap<K,V>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<V>,Map<K,,V> BiMap<K,,V> MutableBiMap<K,,V> InternalIterable<V>,MapIterable<K,,V> MutableMapIterable<K,,V> RichIterable<V>
public class SynchronizedBiMap<K,V>
extends AbstractSynchronizedMapIterable<K,V>
implements MutableBiMap<K,V>, Serializable
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription<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) clone()<K2,V2> MutableBiMap<K2, V2> <R> MutableBiMap<R,V> collectKeysUnique(Function2<? super K, ? super V, ? extends R> function) <R> MutableBiMap<K,R> collectValues(Function2<? super K, ? super V, ? extends R> function) entrySet()flip()<V1> MutableSetMultimap<V1,V> <V1> MutableSetMultimap<V1,V> groupByEach(Function<? super V, ? extends Iterable<V1>> function) <VV> MutableBiMap<VV,V> groupByUniqueKey(Function<? super V, ? extends VV> function) inverse()keySet()newEmpty()static <K,V> SynchronizedBiMap<K, V> of(MutableBiMap<K, V> map) This method will take a MutableBiMap and wrap it directly in a SynchronizedBiMap.<P> PartitionMutableSet<V>partitionWith(Predicate2<? super V, ? super P> predicate, P parameter) voidputAllMapIterable(MapIterable<? extends K, ? extends V> mapIterable) <KK> MutableMap<KK,V> reduceBy(Function<? super V, ? extends KK> groupBy, Function2<? super V, ? super V, ? extends V> reduceFunction) reject(Predicate2<? super K, ? super V> predicate) <P> MutableSet<V>rejectWith(Predicate2<? super V, ? super P> predicate, P parameter) select(Predicate2<? super K, ? super V> predicate) <S> MutableSet<S>selectInstancesOf(Class<S> clazz) <P> MutableSet<V>selectWith(Predicate2<? super V, ? super P> predicate, P parameter) values()withAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValuePairs) withAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues) withKeyValue(K key, V value) withMapIterable(MapIterable<? extends K, ? extends V> mapIterable) withoutAllKeys(Iterable<? extends K> keys) withoutKey(K key) <S> MutableSet<Pair<V,S>> Deprecated.in 8.0.Deprecated.in 8.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, merge, put, putAll, putPair, remove, removeAllKeys, removeIf, removeKey, sumByDouble, sumByFloat, sumByInt, sumByLong, updateValue, updateValueWith, valuesViewMethods inherited from class org.eclipse.collections.impl.collection.AbstractSynchronizedRichIterable
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, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, equals, flatCollect, 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, zipWithIndexMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndexMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, get, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, sizeMethods 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.bimap.MutableBiMap
putMethods inherited from interface org.eclipse.collections.api.map.MutableMapIterable
add, aggregateInPlaceBy, countBy, countByEach, countByWith, forEach, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, getOrDefault, 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, 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, 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 Details
-
of
This method will take a MutableBiMap and wrap it directly in a SynchronizedBiMap. -
forcePut
- Specified by:
forcePutin interfaceMutableBiMap<K,V>
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableBiMap<K,V> - Specified by:
asSynchronizedin interfaceMutableMapIterable<K,V>
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableBiMap<K,V> - Specified by:
asUnmodifiablein interfaceMutableMapIterable<K,V>
-
clone
- Specified by:
clonein interfaceMutableBiMap<K,V>
-
tap
- Specified by:
tapin interfaceBiMap<K,V> - Specified by:
tapin interfaceMapIterable<K,V> - Specified by:
tapin interfaceMutableBiMap<K,V> - Specified by:
tapin interfaceMutableMapIterable<K,V> - Specified by:
tapin interfaceRichIterable<K>- Overrides:
tapin classAbstractSynchronizedMapIterable<K,V>
-
collect
-
collectValues
- Specified by:
collectValuesin interfaceBiMap<K,V> - Specified by:
collectValuesin interfaceMapIterable<K,V> - Specified by:
collectValuesin interfaceMutableBiMap<K,V> - Specified by:
collectValuesin interfaceMutableMapIterable<K,V>
-
collectKeysUnique
- Specified by:
collectKeysUniquein interfaceBiMap<K,V> - Specified by:
collectKeysUniquein interfaceMapIterable<K,V> - Specified by:
collectKeysUniquein interfaceMutableBiMap<K,V> - Specified by:
collectKeysUniquein interfaceMutableMapIterable<K,V>
-
select
- Specified by:
selectin interfaceBiMap<K,V> - Specified by:
selectin interfaceMutableBiMap<K,V> - Specified by:
selectin interfaceMutableMapIterable<K,V> - Specified by:
selectin interfaceRichIterable<K>- Overrides:
selectin classAbstractSynchronizedMapIterable<K,V>
-
select
-
selectWith
- Specified by:
selectWithin interfaceBiMap<K,V> - Specified by:
selectWithin interfaceMutableBiMap<K,V> - Specified by:
selectWithin interfaceMutableMapIterable<K,V> - Specified by:
selectWithin interfaceRichIterable<K>- Overrides:
selectWithin classAbstractSynchronizedMapIterable<K,V>
-
selectInstancesOf
- Specified by:
selectInstancesOfin interfaceBiMap<K,V> - Specified by:
selectInstancesOfin interfaceMutableBiMap<K,V> - Specified by:
selectInstancesOfin interfaceMutableMapIterable<K,V> - Specified by:
selectInstancesOfin interfaceRichIterable<K>- Overrides:
selectInstancesOfin classAbstractSynchronizedMapIterable<K,V>
-
reject
- Specified by:
rejectin interfaceBiMap<K,V> - Specified by:
rejectin interfaceMutableBiMap<K,V> - Specified by:
rejectin interfaceMutableMapIterable<K,V> - Specified by:
rejectin interfaceRichIterable<K>- Overrides:
rejectin classAbstractSynchronizedMapIterable<K,V>
-
reject
-
rejectWith
- Specified by:
rejectWithin interfaceBiMap<K,V> - Specified by:
rejectWithin interfaceMutableBiMap<K,V> - Specified by:
rejectWithin interfaceMutableMapIterable<K,V> - Specified by:
rejectWithin interfaceRichIterable<K>- Overrides:
rejectWithin classAbstractSynchronizedMapIterable<K,V>
-
partition
- Specified by:
partitionin interfaceBiMap<K,V> - Specified by:
partitionin interfaceMutableBiMap<K,V> - Specified by:
partitionin interfaceMutableMapIterable<K,V> - Specified by:
partitionin interfaceRichIterable<K>- Overrides:
partitionin classAbstractSynchronizedMapIterable<K,V>
-
partitionWith
public <P> PartitionMutableSet<V> partitionWith(Predicate2<? super V, ? super P> predicate, P parameter) - Specified by:
partitionWithin interfaceBiMap<K,V> - Specified by:
partitionWithin interfaceMutableBiMap<K,V> - Specified by:
partitionWithin interfaceRichIterable<K>- Overrides:
partitionWithin classAbstractSynchronizedRichIterable<V>
-
groupBy
- Specified by:
groupByin interfaceBiMap<K,V> - Specified by:
groupByin interfaceMutableBiMap<K,V> - Specified by:
groupByin interfaceMutableMapIterable<K,V> - Specified by:
groupByin interfaceRichIterable<K>- Overrides:
groupByin classAbstractSynchronizedMapIterable<K,V>
-
groupByEach
public <V1> MutableSetMultimap<V1,V> groupByEach(Function<? super V, ? extends Iterable<V1>> function) - Specified by:
groupByEachin interfaceBiMap<K,V> - Specified by:
groupByEachin interfaceMutableBiMap<K,V> - Specified by:
groupByEachin interfaceMutableMapIterable<K,V> - Specified by:
groupByEachin interfaceRichIterable<K>- 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 interfaceMutableBiMap<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, MutableMap<K1,V2> 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 interfaceMutableBiMap<K,V> - Specified by:
aggregateByin interfaceMutableMapIterable<K,V> - Overrides:
aggregateByin classAbstractSynchronizedMapIterable<K,V> - Since:
- 11.0
-
reduceBy
public <KK> MutableMap<KK,V> reduceBy(Function<? super V, ? extends KK> groupBy, Function2<? super V, ? super V, ? extends V> reduceFunction) - Specified by:
reduceByin interfaceMutableBiMap<K,V> - Specified by:
reduceByin interfaceMutableMapIterable<K,V> - Specified by:
reduceByin interfaceRichIterable<K>- Overrides:
reduceByin classAbstractSynchronizedMapIterable<K,V>
-
flip
-
newEmpty
- Specified by:
newEmptyin interfaceMutableBiMap<K,V> - Specified by:
newEmptyin interfaceMutableMapIterable<K,V>
-
inverse
-
flipUniqueValues
- Specified by:
flipUniqueValuesin interfaceBiMap<K,V> - Specified by:
flipUniqueValuesin interfaceMapIterable<K,V> - Specified by:
flipUniqueValuesin interfaceMutableBiMap<K,V> - Specified by:
flipUniqueValuesin interfaceMutableMapIterable<K,V>
-
toImmutable
- Specified by:
toImmutablein interfaceBiMap<K,V> - Specified by:
toImmutablein interfaceMapIterable<K,V> - Specified by:
toImmutablein interfaceMutableMapIterable<K,V>
-
zipWithIndex
Deprecated.in 8.0. UseOrderedIterable.zipWithIndex()instead.- Specified by:
zipWithIndexin interfaceBiMap<K,V> - Specified by:
zipWithIndexin interfaceMutableBiMap<K,V> - Specified by:
zipWithIndexin interfaceMutableMapIterable<K,V> - Specified by:
zipWithIndexin interfaceRichIterable<K>- Overrides:
zipWithIndexin classAbstractSynchronizedMapIterable<K,V>
-
groupByUniqueKey
- Specified by:
groupByUniqueKeyin interfaceBiMap<K,V> - Specified by:
groupByUniqueKeyin interfaceMutableBiMap<K,V> - Specified by:
groupByUniqueKeyin interfaceMutableMapIterable<K,V> - Specified by:
groupByUniqueKeyin interfaceRichIterable<K>- Overrides:
groupByUniqueKeyin classAbstractSynchronizedMapIterable<K,V>
-
zip
Deprecated.in 8.0. UseOrderedIterable.zip(Iterable)instead.- Specified by:
zipin interfaceBiMap<K,V> - Specified by:
zipin interfaceMutableBiMap<K,V> - Specified by:
zipin interfaceMutableMapIterable<K,V> - Specified by:
zipin interfaceRichIterable<K>- Overrides:
zipin classAbstractSynchronizedMapIterable<K,V>
-
withKeyValue
- Specified by:
withKeyValuein interfaceMutableBiMap<K,V> - Specified by:
withKeyValuein interfaceMutableMapIterable<K,V>
-
withMap
- Specified by:
withMapin interfaceMutableBiMap<K,V> - Specified by:
withMapin interfaceMutableMapIterable<K,V>
-
withMapIterable
- Specified by:
withMapIterablein interfaceMutableBiMap<K,V> - Specified by:
withMapIterablein interfaceMutableMapIterable<K,V>
-
putAllMapIterable
- Specified by:
putAllMapIterablein interfaceMutableMapIterable<K,V>
-
withAllKeyValues
public MutableBiMap<K,V> withAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues) - Specified by:
withAllKeyValuesin interfaceMutableBiMap<K,V> - Specified by:
withAllKeyValuesin interfaceMutableMapIterable<K,V>
-
withAllKeyValueArguments
- Specified by:
withAllKeyValueArgumentsin interfaceMutableBiMap<K,V> - Specified by:
withAllKeyValueArgumentsin interfaceMutableMapIterable<K,V>
-
withoutKey
- Specified by:
withoutKeyin interfaceMutableBiMap<K,V> - Specified by:
withoutKeyin interfaceMutableMapIterable<K,V>
-
withoutAllKeys
- Specified by:
withoutAllKeysin interfaceMutableBiMap<K,V> - Specified by:
withoutAllKeysin interfaceMutableMapIterable<K,V>
-
keySet
-
values
-
entrySet
-