Top Methods
org.eclipse.collections.api.map

public Interface ImmutableOrderedMap<K, V>

extends OrderedMap<K, V>, ImmutableMapIterable<K, V>
Imports
java.util.Map, org.eclipse.collections.api.block.function.Function, .Function0, .Function2, org.eclipse.collections.api.block.function.primitive.BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .FloatFunction, .IntFunction, .LongFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, 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.primitive.ImmutableObjectDoubleMap, .ImmutableObjectLongMap, org.eclipse.collections.api.multimap.list.ImmutableListMultimap, org.eclipse.collections.api.partition.list.PartitionImmutableList, org.eclipse.collections.api.tuple.Pair

Method Summary

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

Redeclares as abstract: 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> ImmutableOrderedMap<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 <KK, VV> ImmutableOrderedMap<KK, VV>
aggregateInPlaceBy(Function<? super V, ? extends KK> groupBy, Function0<? extends VV> zeroValueFactory, Procedure2<? super VV, ? super V> mutatingAggregator)

Redeclares as abstract: 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 <K2, V2> ImmutableOrderedMap<K2, V2>
collect(Function2<? super K, ? super V, Pair<K2, V2>> function)

Redeclares org.eclipse.collections.api.map.OrderedMap.collect, org.eclipse.collections.api.map.ImmutableMapIterable.collect.

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

public <VV> ImmutableList<VV>
collect(Function<? super V, ? extends VV> function)

Redeclares org.eclipse.collections.api.map.OrderedMap.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 ImmutableBooleanList
collectBoolean(BooleanFunction<? super V> booleanFunction)

Redeclares org.eclipse.collections.api.map.OrderedMap.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.OrderedMap.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.OrderedMap.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.OrderedMap.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.OrderedMap.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 <V1> ImmutableList<V1>
collectIf(Predicate<? super V> predicate, Function<? super V, ? extends V1> function)

Redeclares org.eclipse.collections.api.map.OrderedMap.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.OrderedMap.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.OrderedMap.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.OrderedMap.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> ImmutableOrderedMap<K, R>
collectValues(Function2<? super K, ? super V, ? extends R> function)

Redeclares org.eclipse.collections.api.map.OrderedMap.collectValues, org.eclipse.collections.api.map.ImmutableMapIterable.collectValues.

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

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

Redeclares org.eclipse.collections.api.map.OrderedMap.collectWith, org.eclipse.collections.api.RichIterable.collectWith.

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

public ImmutableList<V>
distinct()

Redeclares org.eclipse.collections.api.map.OrderedMap.distinct.

Returns a new OrderedIterable containing the distinct elements in this iterable.

public ImmutableOrderedMap<K, V>
drop(int count)

Redeclares org.eclipse.collections.api.map.OrderedMap.drop.

Returns an iterable after skipping the first count elements or an empty iterable if the count is greater than the length of the iterable.

public ImmutableOrderedMap<K, V>
dropWhile(Predicate<? super V> predicate)

Redeclares org.eclipse.collections.api.map.OrderedMap.dropWhile.

Returns the final elements that do not satisfy the Predicate.

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

Overrides default org.eclipse.collections.api.map.OrderedMap.flatCollectWith, org.eclipse.collections.api.RichIterable.flatCollectWith.

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

public ImmutableListMultimap<V, K>
flip()

Redeclares org.eclipse.collections.api.map.OrderedMap.flip, org.eclipse.collections.api.map.ImmutableMapIterable.flip.

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

public ImmutableOrderedMap<V, K>
flipUniqueValues()

Redeclares org.eclipse.collections.api.map.OrderedMap.flipUniqueValues, org.eclipse.collections.api.map.ImmutableMapIterable.flipUniqueValues.

Return the MapIterable that is obtained by flipping the direction of this map and making the associations from value to key.

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

Redeclares org.eclipse.collections.api.map.OrderedMap.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 <V1> ImmutableListMultimap<V1, V>
groupByEach(Function<? super V, ? extends Iterable<V1>> function)

Redeclares org.eclipse.collections.api.map.OrderedMap.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 <V1> ImmutableOrderedMap<V1, V>
groupByUniqueKey(Function<? super V, ? extends V1> function)

Redeclares org.eclipse.collections.api.map.OrderedMap.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 ImmutableOrderedMap<K, V>
public ImmutableOrderedMap<K, V>
public ImmutableOrderedMap<K, V>
public ImmutableOrderedMap<K, V>
public ImmutableOrderedMap<K, V>
public ImmutableOrderedMap<K, V>
public ImmutableOrderedMap<K, V>
public PartitionImmutableList<V>
partition(Predicate<? super V> predicate)

Redeclares org.eclipse.collections.api.map.OrderedMap.partition, org.eclipse.collections.api.map.ImmutableMapIterable.partition.

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

public PartitionImmutableList<V>
partitionWhile(Predicate<? super V> predicate)

Redeclares org.eclipse.collections.api.map.OrderedMap.partitionWhile.

Returns a Partition of the initial elements that satisfy the Predicate and the remaining elements.

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

Redeclares org.eclipse.collections.api.map.OrderedMap.partitionWith, org.eclipse.collections.api.RichIterable.partitionWith.

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

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

Redeclares as abstract: 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 ImmutableOrderedMap<K, V>
reject(Predicate2<? super K, ? super V> predicate)

Redeclares org.eclipse.collections.api.map.OrderedMap.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.OrderedMap.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.OrderedMap.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 ImmutableOrderedMap<K, V>
select(Predicate2<? super K, ? super V> predicate)

Redeclares org.eclipse.collections.api.map.OrderedMap.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.OrderedMap.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.OrderedMap.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.OrderedMap.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 <VV> ImmutableObjectDoubleMap<VV>
sumByDouble(Function<? super V, ? extends VV> groupBy, DoubleFunction<? super V> function)

Redeclares org.eclipse.collections.api.RichIterable.sumByDouble.

Groups and sums the values using the two specified functions.

public <VV> ImmutableObjectDoubleMap<VV>
sumByFloat(Function<? super V, ? extends VV> groupBy, FloatFunction<? super V> function)

Redeclares org.eclipse.collections.api.RichIterable.sumByFloat.

Groups and sums the values using the two specified functions.

public <VV> ImmutableObjectLongMap<VV>
sumByInt(Function<? super V, ? extends VV> groupBy, IntFunction<? super V> function)

Redeclares org.eclipse.collections.api.RichIterable.sumByInt.

Groups and sums the values using the two specified functions.

public <VV> ImmutableObjectLongMap<VV>
sumByLong(Function<? super V, ? extends VV> groupBy, LongFunction<? super V> function)

Redeclares org.eclipse.collections.api.RichIterable.sumByLong.

Groups and sums the values using the two specified functions.

public ImmutableOrderedMap<K, V>
take(int count)

Redeclares org.eclipse.collections.api.map.OrderedMap.take.

Returns the first count elements of the iterable or all the elements in the iterable if count is greater than the length of the iterable.

public ImmutableOrderedMap<K, V>
takeWhile(Predicate<? super V> predicate)

Redeclares org.eclipse.collections.api.map.OrderedMap.takeWhile.

Returns the initial elements that satisfy the Predicate.

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

Redeclares org.eclipse.collections.api.map.OrderedMap.tap, org.eclipse.collections.api.map.ImmutableMapIterable.tap.

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

public ImmutableOrderedMap<K, V>
toReversed()

Redeclares org.eclipse.collections.api.map.OrderedMap.toReversed.

Returns a new ReversibleIterable in reverse order.

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

Redeclares org.eclipse.collections.api.map.OrderedMap.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:
castToMapcountBycountByEachcountByWith
Inherited from org.eclipse.collections.api.map.OrderedMap:
toImmutable