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>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <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)Map<K,V>castToMap()voidclear()<VV> ImmutableBag<VV>collect(Function<? super V,? extends VV> function)<K2,V2>
ImmutableBiMap<K2,V2>collect(Function2<? super K,? super V,Pair<K2,V2>> function)ImmutableBooleanBagcollectBoolean(BooleanFunction<? super V> booleanFunction)ImmutableByteBagcollectByte(ByteFunction<? super V> byteFunction)ImmutableCharBagcollectChar(CharFunction<? super V> charFunction)ImmutableDoubleBagcollectDouble(DoubleFunction<? super V> doubleFunction)ImmutableFloatBagcollectFloat(FloatFunction<? super V> floatFunction)<VV> ImmutableBag<VV>collectIf(Predicate<? super V> predicate, Function<? super V,? extends VV> function)ImmutableIntBagcollectInt(IntFunction<? super V> intFunction)ImmutableLongBagcollectLong(LongFunction<? super V> longFunction)ImmutableShortBagcollectShort(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)Set<Map.Entry<K,V>>entrySet()<VV> ImmutableBag<VV>flatCollect(Function<? super V,? extends Iterable<VV>> function)ImmutableSetMultimap<V,K>flip()ImmutableBiMap<V,K>flipUniqueValues()voidforEach(BiConsumer<? super K,? super V> action)<VV> ImmutableSetMultimap<VV,V>groupBy(Function<? super V,? extends VV> function)<VV> ImmutableSetMultimap<VV,V>groupByEach(Function<? super V,? extends Iterable<VV>> function)<VV> ImmutableBiMap<VV,V>groupByUniqueKey(Function<? super V,? extends VV> function)ImmutableBiMap<V,K>inverse()Iterator<V>iterator()Set<K>keySet()ImmutableBiMap<K,V>newWithAllKeyValueArguments(Pair<? extends K,? extends V>... keyValuePairs)ImmutableBiMap<K,V>newWithAllKeyValues(Iterable<? extends Pair<? extends K,? extends V>> keyValues)ImmutableBiMap<K,V>newWithKeyValue(K key, V value)ImmutableBiMap<K,V>newWithMap(Map<? extends K,? extends V> map)ImmutableBiMap<K,V>newWithMapIterable(MapIterable<? extends K,? extends V> mapIterable)ImmutableBiMap<K,V>newWithoutAllKeys(Iterable<? extends K> keys)ImmutableBiMap<K,V>newWithoutKey(K key)PartitionImmutableSet<V>partition(Predicate<? super V> predicate)<P> PartitionImmutableSet<V>partitionWith(Predicate2<? super V,? super P> predicate, P parameter)Vput(K key, V value)voidputAll(Map<? extends K,? extends V> map)ImmutableSet<V>reject(Predicate<? super V> predicate)ImmutableBiMap<K,V>reject(Predicate2<? super K,? super V> predicate)<P> ImmutableSet<V>rejectWith(Predicate2<? super V,? super P> predicate, P parameter)Vremove(Object key)ImmutableSet<V>select(Predicate<? super V> predicate)ImmutableBiMap<K,V>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)ImmutableBiMap<K,V>tap(Procedure<? super V> procedure)ImmutableBiMap<K,V>toImmutable()MutableMap<K,V>toMap()Collection<V>values()<S> ImmutableSet<Pair<V,S>>zip(Iterable<S> that)Deprecated.in 8.0.ImmutableSet<Pair<V,Integer>>zipWithIndex()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, zipWithIndex
-
Methods inherited from interface org.eclipse.collections.api.bimap.ImmutableBiMap
flatCollectWith
-
Methods inherited from interface org.eclipse.collections.api.map.ImmutableMapIterable
countBy, countByEach, countByWith
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndex
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, get, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, 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, getOrDefault, hashCode, ifPresentApply, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, toString, valuesView
-
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
-
newWithKeyValue
public ImmutableBiMap<K,V> newWithKeyValue(K key, V value)
- 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
public ImmutableBiMap<K,V> newWithMap(Map<? extends K,? extends V> map)
- Specified by:
newWithMapin interfaceImmutableBiMap<K,V>- Specified by:
newWithMapin interfaceImmutableMapIterable<K,V>
-
newWithMapIterable
public ImmutableBiMap<K,V> newWithMapIterable(MapIterable<? extends K,? extends V> mapIterable)
- 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
public ImmutableBiMap<K,V> newWithoutKey(K key)
- Specified by:
newWithoutKeyin interfaceImmutableBiMap<K,V>- Specified by:
newWithoutKeyin interfaceImmutableMapIterable<K,V>
-
newWithoutAllKeys
public ImmutableBiMap<K,V> newWithoutAllKeys(Iterable<? extends K> keys)
- Specified by:
newWithoutAllKeysin interfaceImmutableBiMap<K,V>- Specified by:
newWithoutAllKeysin interfaceImmutableMapIterable<K,V>
-
inverse
public ImmutableBiMap<V,K> inverse()
-
flip
public ImmutableSetMultimap<V,K> flip()
-
flipUniqueValues
public ImmutableBiMap<V,K> 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>
-
toImmutable
public ImmutableBiMap<K,V> toImmutable()
- Specified by:
toImmutablein interfaceBiMap<K,V>- Specified by:
toImmutablein interfaceMapIterable<K,V>
-
castToMap
public Map<K,V> castToMap()
- Specified by:
castToMapin interfaceImmutableMapIterable<K,V>
-
toMap
public MutableMap<K,V> toMap()
-
collect
public <K2,V2> ImmutableBiMap<K2,V2> collect(Function2<? super K,? super V,Pair<K2,V2>> function)
-
collect
public <VV> ImmutableBag<VV> collect(Function<? super V,? extends VV> function)
- Specified by:
collectin interfaceImmutableBiMap<K,V>- Specified by:
collectin interfaceRichIterable<K>
-
collectValues
public <R> ImmutableBiMap<K,R> collectValues(Function2<? super K,? super V,? extends R> function)
- Specified by:
collectValuesin interfaceBiMap<K,V>- Specified by:
collectValuesin interfaceImmutableBiMap<K,V>- Specified by:
collectValuesin interfaceImmutableMapIterable<K,V>- Specified by:
collectValuesin interfaceMapIterable<K,V>
-
collectBoolean
public ImmutableBooleanBag collectBoolean(BooleanFunction<? super V> booleanFunction)
- Specified by:
collectBooleanin interfaceRichIterable<K>
-
collectByte
public ImmutableByteBag collectByte(ByteFunction<? super V> byteFunction)
- Specified by:
collectBytein interfaceRichIterable<K>
-
collectChar
public ImmutableCharBag collectChar(CharFunction<? super V> charFunction)
- Specified by:
collectCharin interfaceRichIterable<K>
-
collectDouble
public ImmutableDoubleBag collectDouble(DoubleFunction<? super V> doubleFunction)
- Specified by:
collectDoublein interfaceRichIterable<K>
-
collectFloat
public ImmutableFloatBag collectFloat(FloatFunction<? super V> floatFunction)
- Specified by:
collectFloatin interfaceRichIterable<K>
-
collectInt
public ImmutableIntBag collectInt(IntFunction<? super V> intFunction)
- Specified by:
collectIntin interfaceRichIterable<K>
-
collectLong
public ImmutableLongBag collectLong(LongFunction<? super V> longFunction)
- Specified by:
collectLongin interfaceRichIterable<K>
-
collectShort
public ImmutableShortBag collectShort(ShortFunction<? super V> shortFunction)
- 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
public <VV> ImmutableBag<VV> flatCollect(Function<? super V,? extends Iterable<VV>> function)
- Specified by:
flatCollectin interfaceImmutableBiMap<K,V>- Specified by:
flatCollectin interfaceRichIterable<K>
-
select
public ImmutableBiMap<K,V> select(Predicate2<? super K,? super V> predicate)
-
tap
public ImmutableBiMap<K,V> tap(Procedure<? super V> procedure)
- 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
public ImmutableSet<V> select(Predicate<? super V> predicate)
- Specified by:
selectin interfaceBiMap<K,V>- Specified by:
selectin interfaceImmutableBiMap<K,V>- Specified by:
selectin interfaceImmutableMapIterable<K,V>- Specified by:
selectin interfaceRichIterable<K>
-
selectWith
public <P> ImmutableSet<V> selectWith(Predicate2<? super V,? super P> predicate, P parameter)
- Specified by:
selectWithin interfaceBiMap<K,V>- Specified by:
selectWithin interfaceImmutableBiMap<K,V>- Specified by:
selectWithin interfaceImmutableMapIterable<K,V>- Specified by:
selectWithin interfaceRichIterable<K>
-
reject
public ImmutableBiMap<K,V> reject(Predicate2<? super K,? super V> predicate)
-
reject
public ImmutableSet<V> reject(Predicate<? super V> predicate)
- Specified by:
rejectin interfaceBiMap<K,V>- Specified by:
rejectin interfaceImmutableBiMap<K,V>- Specified by:
rejectin interfaceImmutableMapIterable<K,V>- Specified by:
rejectin interfaceRichIterable<K>
-
rejectWith
public <P> ImmutableSet<V> rejectWith(Predicate2<? super V,? super P> predicate, P parameter)
- Specified by:
rejectWithin interfaceBiMap<K,V>- Specified by:
rejectWithin interfaceImmutableBiMap<K,V>- Specified by:
rejectWithin interfaceImmutableMapIterable<K,V>- Specified by:
rejectWithin interfaceRichIterable<K>
-
partition
public PartitionImmutableSet<V> partition(Predicate<? super V> predicate)
- 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 public <S> ImmutableSet<Pair<V,S>> zip(Iterable<S> that)
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 public ImmutableSet<Pair<V,Integer>> 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
public <VV> ImmutableSetMultimap<VV,V> groupBy(Function<? super V,? extends VV> function)
- 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
public <VV> ImmutableBiMap<VV,V> groupByUniqueKey(Function<? super V,? extends VV> function)
- 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,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)
- 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>
-
selectInstancesOf
public <S> ImmutableSet<S> selectInstancesOf(Class<S> clazz)
- Specified by:
selectInstancesOfin interfaceBiMap<K,V>- Specified by:
selectInstancesOfin interfaceImmutableBiMap<K,V>- Specified by:
selectInstancesOfin interfaceImmutableMapIterable<K,V>- Specified by:
selectInstancesOfin interfaceRichIterable<K>
-
-