Top Description Methods
org.eclipse.collections.api.map.sorted

public Interface ImmutableSortedMap<K, V>

extends SortedMapIterable<K, V>, ImmutableMapIterable<K, V>
Imports
java.util.Map, .SortedMap, org.eclipse.collections.api.block.function.Function, .Function0, .Function2, org.eclipse.collections.api.block.function.primitive.BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .FloatFunction, .IntFunction, .LongFunction, .ObjectIntToObjectFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.factory.Maps, org.eclipse.collections.api.list.ImmutableList, org.eclipse.collections.api.list.primitive.ImmutableBooleanList, .ImmutableByteList, .ImmutableCharList, .ImmutableDoubleList, .ImmutableFloatList, .ImmutableIntList, .ImmutableLongList, .ImmutableShortList, org.eclipse.collections.api.map.ImmutableMap, .ImmutableMapIterable, .ImmutableOrderedMap, .MapIterable, .MutableMap, org.eclipse.collections.api.multimap.list.ImmutableListMultimap, org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap, org.eclipse.collections.api.partition.list.PartitionImmutableList, org.eclipse.collections.api.tuple.Pair

An ImmutableSortedMap is different from a JCF SortedMap because it has no mutating methods. It provides the read-only protocol of a SortedMap.

Method Summary

Modifier and TypeMethod and Description
public default <KK, VV> ImmutableMap<KK, VV>
aggregateBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Function2<? super VV, ? super V, ? extends VV> nonMutatingAggregator)

Overrides default org.eclipse.collections.api.RichIterable.aggregateBy, org.eclipse.collections.api.map.ImmutableMapIterable.aggregateBy.

Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function.

public default <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)

Overrides default org.eclipse.collections.api.map.MapIterable.aggregateBy, org.eclipse.collections.api.map.ImmutableMapIterable.aggregateBy.

Applies an aggregate function over the map grouping results into a map based on the specific key and value groupBy functions.

public default <KK, VV> ImmutableMap<KK, VV>
aggregateInPlaceBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Procedure2<? super VV, ? super V> mutatingAggregator)

Overrides default org.eclipse.collections.api.RichIterable.aggregateInPlaceBy, org.eclipse.collections.api.map.ImmutableMapIterable.aggregateInPlaceBy.

Applies an aggregate procedure over the iterable grouping results into a Map based on the specific groupBy function.

public SortedMap<K, V>
public SortedMap<K, V>
public <R> ImmutableList<R>
collect(Function<? super V, ? extends R> function)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collect, org.eclipse.collections.api.RichIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public <K2, V2> ImmutableMap<K2, V2>
collect(Function2<? super K, ? super V, Pair<K2, V2>> function)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collect, org.eclipse.collections.api.map.ImmutableMapIterable.collect.

For each key and value of the map the function is evaluated.

public ImmutableBooleanList
collectBoolean(BooleanFunction<? super V> booleanFunction)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectBoolean, org.eclipse.collections.api.RichIterable.collectBoolean.

Returns a new primitive boolean iterable with the results of applying the specified function on each element of the source collection.

public ImmutableByteList
collectByte(ByteFunction<? super V> byteFunction)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectByte, org.eclipse.collections.api.RichIterable.collectByte.

Returns a new primitive byte iterable with the results of applying the specified function on each element of the source collection.

public ImmutableCharList
collectChar(CharFunction<? super V> charFunction)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectChar, org.eclipse.collections.api.RichIterable.collectChar.

Returns a new primitive char iterable with the results of applying the specified function on each element of the source collection.

public ImmutableDoubleList
collectDouble(DoubleFunction<? super V> doubleFunction)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectDouble, org.eclipse.collections.api.RichIterable.collectDouble.

Returns a new primitive double iterable with the results of applying the specified function on each element of the source collection.

public ImmutableFloatList
collectFloat(FloatFunction<? super V> floatFunction)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectFloat, org.eclipse.collections.api.RichIterable.collectFloat.

Returns a new primitive float iterable with the results of applying the specified function on each element of the source collection.

public <R> ImmutableList<R>
collectIf(Predicate<? super V> predicate, Function<? super V, ? extends R> function)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectIf, org.eclipse.collections.api.RichIterable.collectIf.

Returns a new collection with the results of applying the specified function on each element of the source collection, but only for those elements which return true upon evaluation of the predicate.

public ImmutableIntList
collectInt(IntFunction<? super V> intFunction)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectInt, org.eclipse.collections.api.RichIterable.collectInt.

Returns a new primitive int iterable with the results of applying the specified function on each element of the source collection.

public <R> ImmutableOrderedMap<R, V>
collectKeysUnique(Function2<? super K, ? super V, ? extends R> function)

Redeclares org.eclipse.collections.api.map.MapIterable.collectKeysUnique, org.eclipse.collections.api.map.ImmutableMapIterable.collectKeysUnique.

For each key and value of the map the function is evaluated.

public ImmutableLongList
collectLong(LongFunction<? super V> longFunction)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectLong, org.eclipse.collections.api.RichIterable.collectLong.

Returns a new primitive long iterable with the results of applying the specified function on each element of the source collection.

public ImmutableShortList
collectShort(ShortFunction<? super V> shortFunction)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectShort, org.eclipse.collections.api.RichIterable.collectShort.

Returns a new primitive short iterable with the results of applying the specified function on each element of the source collection.

public <R> ImmutableSortedMap<K, R>
collectValues(Function2<? super K, ? super V, ? extends R> function)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectValues, org.eclipse.collections.api.map.ImmutableMapIterable.collectValues.

For each key and value of the map the function is evaluated.

public <P, VV> ImmutableList<VV>
collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.collectWith, org.eclipse.collections.api.RichIterable.collectWith.

Same as collect(Function) with a Function2 and specified parameter which is passed to the block.

public default <R> ImmutableList<R>
collectWithIndex(ObjectIntToObjectFunction<? super V, ? extends R> function)

Overrides default org.eclipse.collections.api.map.sorted.SortedMapIterable.collectWithIndex.

Returns a new OrderedIterable using results obtained by applying the specified function to each element and its corresponding index.

public <R> ImmutableList<R>
public default <P, R> ImmutableList<R>
flatCollectWith(Function2<? super V, ? super P, ? extends Iterable<R>> function, P parameter)

Overrides default org.eclipse.collections.api.map.sorted.SortedMapIterable.flatCollectWith, org.eclipse.collections.api.RichIterable.flatCollectWith.

Same as flatCollect, only with a Function2 that is passed an extra parameter.

public ImmutableSortedSetMultimap<V, K>
flip()

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.flip, org.eclipse.collections.api.map.ImmutableMapIterable.flip.

Given a map from Domain -> Range return a multimap from Range -> Domain.

public <VV> ImmutableListMultimap<VV, V>
groupBy(Function<? super V, ? extends VV> function)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.groupBy, org.eclipse.collections.api.map.ImmutableMapIterable.groupBy.

For each element of the iterable, the function is evaluated and the results of these evaluations are collected into a new multimap, where the transformed value is the key and the original values are added to the same (or similar) species of collection as the source iterable.

public <VV> ImmutableListMultimap<VV, V>
groupByEach(Function<? super V, ? extends Iterable<VV>> function)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.groupByEach, org.eclipse.collections.api.map.ImmutableMapIterable.groupByEach.

Similar to groupBy(Function), except the result of evaluating function will return a collection of keys for each value.

public default <VV> ImmutableMap<VV, V>
groupByUniqueKey(Function<? super V, ? extends VV> function)

Implements org.eclipse.collections.api.RichIterable.groupByUniqueKey, org.eclipse.collections.api.map.ImmutableMapIterable.groupByUniqueKey.

For each element of the iterable, the function is evaluated, and the results of these evaluations are collected into a new map, where the transformed value is the key.

public ImmutableSortedMap<K, V>
public ImmutableSortedMap<K, V>
public ImmutableSortedMap<K, V>
public ImmutableSortedMap<K, V>
public ImmutableSortedMap<K, V>
public ImmutableSortedMap<K, V>
public ImmutableSortedMap<K, V>
public PartitionImmutableList<V>
partition(Predicate<? super V> predicate)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.partition, org.eclipse.collections.api.map.ImmutableMapIterable.partition.

Filters a collection into a PartitionedIterable based on the evaluation of the predicate.

public <P> PartitionImmutableList<V>
partitionWith(Predicate2<? super V, ? super P> predicate, P parameter)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.partitionWith, org.eclipse.collections.api.RichIterable.partitionWith.

Filters a collection into a PartitionIterable based on the evaluation of the predicate.

public default <KK> ImmutableMap<KK, V>
reduceBy(Function<? super V, ? extends KK> groupBy, Function2<? super V, ? super V, ? extends V> reduceFunction)

Overrides default org.eclipse.collections.api.RichIterable.reduceBy, org.eclipse.collections.api.map.ImmutableMapIterable.reduceBy.

Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function.

public ImmutableSortedMap<K, V>
reject(Predicate2<? super K, ? super V> predicate)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.reject, org.eclipse.collections.api.map.ImmutableMapIterable.reject.

For each key and value of the map the predicate is evaluated, if the result of the evaluation is false, that key and value are returned in a new map.

public ImmutableList<V>
reject(Predicate<? super V> predicate)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.reject, org.eclipse.collections.api.map.ImmutableMapIterable.reject.

Returns all elements of the source collection that return false when evaluating of the predicate.

public <P> ImmutableList<V>
rejectWith(Predicate2<? super V, ? super P> predicate, P parameter)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.rejectWith, org.eclipse.collections.api.map.ImmutableMapIterable.rejectWith.

Similar to reject(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

public ImmutableSortedMap<K, V>
select(Predicate2<? super K, ? super V> predicate)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.select, org.eclipse.collections.api.map.ImmutableMapIterable.select.

For each key and value of the map the predicate is evaluated, if the result of the evaluation is true, that key and value are returned in a new map.

public ImmutableList<V>
select(Predicate<? super V> predicate)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.select, org.eclipse.collections.api.map.ImmutableMapIterable.select.

Returns all elements of the source collection that return true when evaluating the predicate.

public <S> ImmutableList<S>
selectInstancesOf(Class<S> clazz)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.selectInstancesOf, org.eclipse.collections.api.map.ImmutableMapIterable.selectInstancesOf.

Returns all elements of the source collection that are instances of the Class clazz.

public <P> ImmutableList<V>
selectWith(Predicate2<? super V, ? super P> predicate, P parameter)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.selectWith, org.eclipse.collections.api.map.ImmutableMapIterable.selectWith.

Similar to select(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

public ImmutableSortedMap<K, V>
tap(Procedure<? super V> procedure)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.tap, org.eclipse.collections.api.map.ImmutableMapIterable.tap.

Executes the Procedure for each value of the map and returns this.

public MutableSortedMap<K, V>
public <S> ImmutableList<Pair<V, S>>
zip(Iterable<S> that)

Redeclares org.eclipse.collections.api.map.sorted.SortedMapIterable.zip, org.eclipse.collections.api.map.ImmutableMapIterable.zip.

Returns a RichIterable formed from this RichIterable and another RichIterable by combining corresponding elements in pairs.

public ImmutableList<Pair<V, Integer>>
Inherited from org.eclipse.collections.api.map.ImmutableMapIterable:
countBycountByEachcountByWithflipUniqueValues
Inherited from org.eclipse.collections.api.map.sorted.SortedMapIterable:
comparatordistinctdropdropWhilepartitionWhiletaketakeWhiletoImmutabletoReversed