Class AbstractImmutableBiMap<K,V>
java.lang.Object
org.eclipse.collections.impl.bimap.AbstractBiMap<K,V>
org.eclipse.collections.impl.bimap.immutable.AbstractImmutableBiMap<K,V>
- All Implemented Interfaces:
Iterable<V>,Map<K,,V> BiMap<K,,V> ImmutableBiMap<K,,V> InternalIterable<V>,ImmutableMapIterable<K,,V> MapIterable<K,,V> RichIterable<V>
public abstract class AbstractImmutableBiMap<K,V>
extends AbstractBiMap<K,V>
implements ImmutableBiMap<K,V>, Map<K,V>
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription<K1,V1, V2> ImmutableMap<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> ImmutableMap<K2, V2> aggregateBy(Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Function2<? super V2, ? super V, ? extends V2> nonMutatingAggregator) <K2,V2> ImmutableMap<K2, V2> aggregateInPlaceBy(Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Procedure2<? super V2, ? super V> mutatingAggregator) voidclear()<VV> ImmutableBag<VV><K2,V2> ImmutableBiMap<K2, V2> 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) <VV> ImmutableBag<VV>collectInt(IntFunction<? super V> intFunction) <R> ImmutableBiMap<R,V> collectKeysUnique(Function2<? super K, ? super V, ? extends R> function) collectLong(LongFunction<? super V> longFunction) collectShort(ShortFunction<? super V> shortFunction) <R> ImmutableBiMap<K,R> collectValues(Function2<? super K, ? super V, ? extends R> function) <P,VV> ImmutableBag<VV> collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter) entrySet()<VV> ImmutableBag<VV>flatCollect(Function<? super V, ? extends Iterable<VV>> function) flip()voidforEach(BiConsumer<? super K, ? super V> action) <VV> ImmutableSetMultimap<VV,V> <VV> ImmutableSetMultimap<VV,V> groupByEach(Function<? super V, ? extends Iterable<VV>> function) <VV> ImmutableBiMap<VV,V> groupByUniqueKey(Function<? super V, ? extends VV> function) inverse()iterator()keySet()newWithAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValuePairs) newWithAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues) newWithKeyValue(K key, V value) newWithMap(Map<? extends K, ? extends V> map) newWithMapIterable(MapIterable<? extends K, ? extends V> mapIterable) newWithoutAllKeys(Iterable<? extends K> keys) newWithoutKey(K key) <P> PartitionImmutableSet<V>partitionWith(Predicate2<? super V, ? super P> predicate, P parameter) void<K2> ImmutableMap<K2,V> reduceBy(Function<? super V, ? extends K2> groupBy, Function2<? super V, ? super V, ? extends V> reduceFunction) reject(Predicate2<? super K, ? super V> predicate) <P> ImmutableSet<V>rejectWith(Predicate2<? super V, ? super P> predicate, P parameter) select(Predicate2<? super K, ? super V> predicate) <S> ImmutableSet<S>selectInstancesOf(Class<S> clazz) <P> ImmutableSet<V>selectWith(Predicate2<? super V, ? super P> predicate, P parameter) <V1> ImmutableObjectDoubleMap<V1>sumByDouble(Function<? super V, ? extends V1> groupBy, DoubleFunction<? super V> function) <V1> ImmutableObjectDoubleMap<V1>sumByFloat(Function<? super V, ? extends V1> groupBy, FloatFunction<? super V> function) <V1> ImmutableObjectLongMap<V1>sumByInt(Function<? super V, ? extends V1> groupBy, IntFunction<? super V> function) <V1> ImmutableObjectLongMap<V1>sumByLong(Function<? super V, ? extends V1> groupBy, LongFunction<? super V> function) MutableMap<K,V> toMap()values()<S> ImmutableSet<Pair<V,S>> Deprecated.in 8.0.Deprecated.in 8.0.Methods inherited from class org.eclipse.collections.impl.bimap.AbstractBiMap
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsKey, containsValue, count, countWith, detect, detect, detectIfNone, detectOptional, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, equals, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, forEachKey, forEachKeyValue, forEachValue, forEachWith, forEachWithIndex, get, getFirst, getIfAbsent, getIfAbsentValue, getIfAbsentWith, getLast, getOnly, getOrDefault, groupBy, groupByEach, groupByUniqueKey, hashCode, ifPresentApply, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, keysView, keyValuesView, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, size, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedList, toSortedList, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toString, valuesView, zip, zipWithIndexMethods inherited from interface org.eclipse.collections.api.bimap.ImmutableBiMap
flatCollectWithMethods inherited from interface org.eclipse.collections.api.map.ImmutableMapIterable
countBy, countByEach, countByWithMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndexMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, get, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, 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, getOrDefault, hashCode, ifPresentApply, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, toString, valuesViewMethods 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
-
Method Details
-
newWithKeyValue
- Specified by:
newWithKeyValuein interfaceImmutableBiMap<K,V> - Specified by:
newWithKeyValuein interfaceImmutableMapIterable<K,V>
-
newWithAllKeyValues
public ImmutableBiMap<K,V> newWithAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues) - Specified by:
newWithAllKeyValuesin interfaceImmutableBiMap<K,V> - Specified by:
newWithAllKeyValuesin interfaceImmutableMapIterable<K,V>
-
newWithMap
- Specified by:
newWithMapin interfaceImmutableBiMap<K,V> - Specified by:
newWithMapin interfaceImmutableMapIterable<K,V>
-
newWithMapIterable
- Specified by:
newWithMapIterablein interfaceImmutableBiMap<K,V> - Specified by:
newWithMapIterablein interfaceImmutableMapIterable<K,V>
-
newWithAllKeyValueArguments
public ImmutableBiMap<K,V> newWithAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValuePairs) - Specified by:
newWithAllKeyValueArgumentsin interfaceImmutableBiMap<K,V> - Specified by:
newWithAllKeyValueArgumentsin interfaceImmutableMapIterable<K,V>
-
newWithoutKey
- Specified by:
newWithoutKeyin interfaceImmutableBiMap<K,V> - Specified by:
newWithoutKeyin interfaceImmutableMapIterable<K,V>
-
newWithoutAllKeys
- Specified by:
newWithoutAllKeysin interfaceImmutableBiMap<K,V> - Specified by:
newWithoutAllKeysin interfaceImmutableMapIterable<K,V>
-
inverse
-
flip
-
flipUniqueValues
- Specified by:
flipUniqueValuesin interfaceBiMap<K,V> - Specified by:
flipUniqueValuesin interfaceImmutableBiMap<K,V> - Specified by:
flipUniqueValuesin interfaceImmutableMapIterable<K,V> - Specified by:
flipUniqueValuesin interfaceMapIterable<K,V>
-
put
-
putAll
-
remove
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
iterator
-
toImmutable
- Specified by:
toImmutablein interfaceBiMap<K,V> - Specified by:
toImmutablein interfaceMapIterable<K,V>
-
castToMap
- Specified by:
castToMapin interfaceImmutableMapIterable<K,V>
-
toMap
-
collect
-
collect
- Specified by:
collectin interfaceImmutableBiMap<K,V> - Specified by:
collectin interfaceRichIterable<K>
-
collectValues
- Specified by:
collectValuesin interfaceBiMap<K,V> - Specified by:
collectValuesin interfaceImmutableBiMap<K,V> - Specified by:
collectValuesin interfaceImmutableMapIterable<K,V> - Specified by:
collectValuesin interfaceMapIterable<K,V>
-
collectKeysUnique
public <R> ImmutableBiMap<R,V> collectKeysUnique(Function2<? super K, ? super V, ? extends R> function) - Specified by:
collectKeysUniquein interfaceBiMap<K,V> - Specified by:
collectKeysUniquein interfaceImmutableBiMap<K,V> - Specified by:
collectKeysUniquein interfaceImmutableMapIterable<K,V> - Specified by:
collectKeysUniquein interfaceMapIterable<K,V>
-
collectBoolean
- Specified by:
collectBooleanin interfaceRichIterable<K>
-
collectByte
- Specified by:
collectBytein interfaceRichIterable<K>
-
collectChar
- Specified by:
collectCharin interfaceRichIterable<K>
-
collectDouble
- Specified by:
collectDoublein interfaceRichIterable<K>
-
collectFloat
- Specified by:
collectFloatin interfaceRichIterable<K>
-
collectInt
- Specified by:
collectIntin interfaceRichIterable<K>
-
collectLong
- Specified by:
collectLongin interfaceRichIterable<K>
-
collectShort
- Specified by:
collectShortin interfaceRichIterable<K>
-
collectWith
public <P,VV> ImmutableBag<VV> collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter) - Specified by:
collectWithin interfaceImmutableBiMap<K,V> - Specified by:
collectWithin interfaceRichIterable<K>
-
collectIf
public <VV> ImmutableBag<VV> collectIf(Predicate<? super V> predicate, Function<? super V, ? extends VV> function) - Specified by:
collectIfin interfaceImmutableBiMap<K,V> - Specified by:
collectIfin interfaceRichIterable<K>
-
flatCollect
- Specified by:
flatCollectin interfaceImmutableBiMap<K,V> - Specified by:
flatCollectin interfaceRichIterable<K>
-
select
-
tap
- Specified by:
tapin interfaceBiMap<K,V> - Specified by:
tapin interfaceImmutableBiMap<K,V> - Specified by:
tapin interfaceImmutableMapIterable<K,V> - Specified by:
tapin interfaceMapIterable<K,V> - Specified by:
tapin interfaceRichIterable<K>
-
select
- Specified by:
selectin interfaceBiMap<K,V> - Specified by:
selectin interfaceImmutableBiMap<K,V> - Specified by:
selectin interfaceImmutableMapIterable<K,V> - Specified by:
selectin interfaceRichIterable<K>
-
selectWith
- Specified by:
selectWithin interfaceBiMap<K,V> - Specified by:
selectWithin interfaceImmutableBiMap<K,V> - Specified by:
selectWithin interfaceImmutableMapIterable<K,V> - Specified by:
selectWithin interfaceRichIterable<K>
-
reject
-
reject
- Specified by:
rejectin interfaceBiMap<K,V> - Specified by:
rejectin interfaceImmutableBiMap<K,V> - Specified by:
rejectin interfaceImmutableMapIterable<K,V> - Specified by:
rejectin interfaceRichIterable<K>
-
rejectWith
- Specified by:
rejectWithin interfaceBiMap<K,V> - Specified by:
rejectWithin interfaceImmutableBiMap<K,V> - Specified by:
rejectWithin interfaceImmutableMapIterable<K,V> - Specified by:
rejectWithin interfaceRichIterable<K>
-
partition
- Specified by:
partitionin interfaceBiMap<K,V> - Specified by:
partitionin interfaceImmutableBiMap<K,V> - Specified by:
partitionin interfaceImmutableMapIterable<K,V> - Specified by:
partitionin interfaceRichIterable<K>
-
partitionWith
public <P> PartitionImmutableSet<V> partitionWith(Predicate2<? super V, ? super P> predicate, P parameter) - Specified by:
partitionWithin interfaceBiMap<K,V> - Specified by:
partitionWithin interfaceImmutableBiMap<K,V> - Specified by:
partitionWithin interfaceRichIterable<K>
-
zip
Deprecated.in 8.0. UseOrderedIterable.zip(Iterable)instead.- Specified by:
zipin interfaceBiMap<K,V> - Specified by:
zipin interfaceImmutableBiMap<K,V> - Specified by:
zipin interfaceImmutableMapIterable<K,V> - Specified by:
zipin interfaceRichIterable<K>
-
zipWithIndex
Deprecated.in 8.0. UseOrderedIterable.zipWithIndex()instead.- Specified by:
zipWithIndexin interfaceBiMap<K,V> - Specified by:
zipWithIndexin interfaceImmutableBiMap<K,V> - Specified by:
zipWithIndexin interfaceImmutableMapIterable<K,V> - Specified by:
zipWithIndexin interfaceRichIterable<K>
-
sumByInt
public <V1> ImmutableObjectLongMap<V1> sumByInt(Function<? super V, ? extends V1> groupBy, IntFunction<? super V> function) - Specified by:
sumByIntin interfaceRichIterable<K>
-
sumByFloat
public <V1> ImmutableObjectDoubleMap<V1> sumByFloat(Function<? super V, ? extends V1> groupBy, FloatFunction<? super V> function) - Specified by:
sumByFloatin interfaceRichIterable<K>
-
sumByLong
public <V1> ImmutableObjectLongMap<V1> sumByLong(Function<? super V, ? extends V1> groupBy, LongFunction<? super V> function) - Specified by:
sumByLongin interfaceRichIterable<K>
-
sumByDouble
public <V1> ImmutableObjectDoubleMap<V1> sumByDouble(Function<? super V, ? extends V1> groupBy, DoubleFunction<? super V> function) - Specified by:
sumByDoublein interfaceRichIterable<K>
-
groupBy
- Specified by:
groupByin interfaceBiMap<K,V> - Specified by:
groupByin interfaceImmutableBiMap<K,V> - Specified by:
groupByin interfaceImmutableMapIterable<K,V> - Specified by:
groupByin interfaceRichIterable<K>
-
groupByEach
public <VV> ImmutableSetMultimap<VV,V> groupByEach(Function<? super V, ? extends Iterable<VV>> function) - Specified by:
groupByEachin interfaceBiMap<K,V> - Specified by:
groupByEachin interfaceImmutableBiMap<K,V> - Specified by:
groupByEachin interfaceImmutableMapIterable<K,V> - Specified by:
groupByEachin interfaceRichIterable<K>
-
groupByUniqueKey
- Specified by:
groupByUniqueKeyin interfaceBiMap<K,V> - Specified by:
groupByUniqueKeyin interfaceImmutableBiMap<K,V> - Specified by:
groupByUniqueKeyin interfaceImmutableMapIterable<K,V> - Specified by:
groupByUniqueKeyin interfaceRichIterable<K>
-
aggregateBy
public <K2,V2> ImmutableMap<K2,V2> aggregateBy(Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Function2<? super V2, ? super V, ? extends V2> nonMutatingAggregator) - Specified by:
aggregateByin interfaceImmutableBiMap<K,V> - Specified by:
aggregateByin interfaceImmutableMapIterable<K,V> - Specified by:
aggregateByin interfaceRichIterable<K>
-
aggregateBy
public <K1,V1, ImmutableMap<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 interfaceImmutableBiMap<K,V> - Specified by:
aggregateByin interfaceImmutableMapIterable<K,V> - Specified by:
aggregateByin interfaceMapIterable<K,V>
-
aggregateInPlaceBy
public <K2,V2> ImmutableMap<K2,V2> aggregateInPlaceBy(Function<? super V, ? extends K2> groupBy, Function0<? extends V2> zeroValueFactory, Procedure2<? super V2, ? super V> mutatingAggregator) - Specified by:
aggregateInPlaceByin interfaceImmutableBiMap<K,V> - Specified by:
aggregateInPlaceByin interfaceImmutableMapIterable<K,V> - Specified by:
aggregateInPlaceByin interfaceRichIterable<K>
-
reduceBy
public <K2> ImmutableMap<K2,V> reduceBy(Function<? super V, ? extends K2> groupBy, Function2<? super V, ? super V, ? extends V> reduceFunction) - Specified by:
reduceByin interfaceImmutableBiMap<K,V> - Specified by:
reduceByin interfaceImmutableMapIterable<K,V> - Specified by:
reduceByin interfaceRichIterable<K>
-
selectInstancesOf
- Specified by:
selectInstancesOfin interfaceBiMap<K,V> - Specified by:
selectInstancesOfin interfaceImmutableBiMap<K,V> - Specified by:
selectInstancesOfin interfaceImmutableMapIterable<K,V> - Specified by:
selectInstancesOfin interfaceRichIterable<K>
-
forEach
-