Top Constructors Methods
org.eclipse.collections.impl.map.sorted.mutable

public abstract Class AbstractMutableSortedMap<K, V>

extends AbstractMutableMapIterable<K, V>
implements MutableSortedMap<K, V>
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.map.sorted.MutableSortedMap, java.lang.Cloneable, java.util.SortedMap, java.util.SequencedMap, java.util.Map, org.eclipse.collections.api.map.sorted.SortedMapIterable, org.eclipse.collections.api.ordered.ReversibleIterable, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.InternalIterable, java.lang.Iterable, org.eclipse.collections.api.map.MapIterable, org.eclipse.collections.api.map.MutableMapIterable
Known Direct Subclasses
org.eclipse.collections.impl.map.sorted.mutable.SortedMapAdapter, org.eclipse.collections.impl.map.sorted.mutable.TreeSortedMap
Imports
java.util.LinkedHashMap, org.eclipse.collections.api.block.function.Function, .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, org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure, org.eclipse.collections.api.factory.Lists, .SortedMaps, org.eclipse.collections.api.factory.primitive.BooleanLists, .ByteLists, .CharLists, .DoubleLists, .FloatLists, .IntLists, .LongLists, .ShortLists, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.MutableBooleanList, .MutableByteList, .MutableCharList, .MutableDoubleList, .MutableFloatList, .MutableIntList, .MutableLongList, .MutableShortList, org.eclipse.collections.api.map.MutableMap, .MutableOrderedMap, org.eclipse.collections.api.map.sorted.ImmutableSortedMap, .MutableSortedMap, org.eclipse.collections.api.multimap.list.MutableListMultimap, org.eclipse.collections.api.multimap.sortedset.MutableSortedSetMultimap, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.partition.list.PartitionMutableList, org.eclipse.collections.api.stack.MutableStack, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.block.factory.Functions, .Predicates, org.eclipse.collections.impl.block.procedure.MapCollectProcedure, .PartitionPredicate2Procedure, .PartitionProcedure, .SelectInstancesOfProcedure, org.eclipse.collections.impl.list.fixed.ArrayAdapter, org.eclipse.collections.impl.list.mutable.FastList, org.eclipse.collections.impl.map.mutable.AbstractMutableMapIterable, .UnifiedMap, org.eclipse.collections.impl.map.ordered.mutable.OrderedMapAdapter, org.eclipse.collections.impl.multimap.list.FastListMultimap, org.eclipse.collections.impl.partition.list.PartitionFastList, org.eclipse.collections.impl.utility.Iterate, .MapIterate

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public MutableSortedMap<K, V>
public MutableSortedMap<K, V>
public abstract MutableSortedMap<K, V>
clone()

Redeclares org.eclipse.collections.api.map.sorted.MutableSortedMap.clone.

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.

public <R> MutableList<R>
collect(Function<? super V, ? extends R> function)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 MutableBooleanList
collectBoolean(BooleanFunction<? super V> booleanFunction)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 MutableByteList
collectByte(ByteFunction<? super V> byteFunction)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 MutableCharList
collectChar(CharFunction<? super V> charFunction)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 MutableDoubleList
collectDouble(DoubleFunction<? super V> doubleFunction)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 MutableFloatList
collectFloat(FloatFunction<? super V> floatFunction)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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> MutableList<R>
collectIf(Predicate<? super V> predicate, Function<? super V, ? extends R> function)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 MutableIntList
collectInt(IntFunction<? super V> intFunction)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 <E> MutableSortedMap<K, V>
collectKeysAndValues(Iterable<E> iterable, Function<? super E, ? extends K> keyFunction, Function<? super E, ? extends V> valueFunction)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.collectKeysAndValues.

Adds all the entries derived from iterable to this.

public <R> MutableOrderedMap<R, V>
public MutableLongList
collectLong(LongFunction<? super V> longFunction)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 MutableShortList
collectShort(ShortFunction<? super V> shortFunction)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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> MutableSortedMap<K, R>
public <P, VV> MutableList<VV>
collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.collectWith, org.eclipse.collections.api.RichIterable.collectWith.

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

public <S> boolean
corresponds(OrderedIterable<S> other, Predicate2<? super V, ? super S> predicate)

Implements org.eclipse.collections.api.ordered.OrderedIterable.corresponds.

Returns true if both OrderedIterables have the same length and predicate returns true for all corresponding elements e1 of this OrderedIterable and e2 of other.

public int
detectIndex(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.ordered.OrderedIterable.detectIndex.

Returns the index of the first element of the OrderedIterable for which the predicate evaluates to true.

public int
detectLastIndex(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.ordered.ReversibleIterable.detectLastIndex.

Returns the index of the last element of the ReversibleIterable for which the predicate evaluates to true.

public <R> MutableList<R>
public MutableSortedSetMultimap<V, K>
public void
forEach(int startIndex, int endIndex, Procedure<? super V> procedure)

Implements org.eclipse.collections.api.ordered.OrderedIterable.forEach.

Iterates over the section of the iterable covered by the specified inclusive indexes.

public void
forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super V> objectIntProcedure)

Implements org.eclipse.collections.api.ordered.OrderedIterable.forEachWithIndex.

Iterates over the section of the iterable covered by the specified inclusive indexes.

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.groupBy, org.eclipse.collections.api.map.MutableMapIterable.groupBy, org.eclipse.collections.api.RichIterable.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> MutableListMultimap<VV, V>
groupByEach(Function<? super V, ? extends Iterable<VV>> function)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.groupByEach, org.eclipse.collections.api.map.MutableMapIterable.groupByEach, org.eclipse.collections.api.RichIterable.groupByEach.

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

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

Overrides org.eclipse.collections.impl.map.mutable.AbstractMutableMapIterable.groupByUniqueKey.

Overrides default org.eclipse.collections.api.map.sorted.MutableSortedMap.groupByUniqueKey.

Implements org.eclipse.collections.api.map.MutableMapIterable.groupByUniqueKey, org.eclipse.collections.api.RichIterable.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 PartitionMutableList<V>
partition(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.partition, org.eclipse.collections.api.map.MutableMapIterable.partition, org.eclipse.collections.api.RichIterable.partition.

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

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.partitionWith, org.eclipse.collections.api.RichIterable.partitionWith.

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

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.reject, org.eclipse.collections.api.map.MutableMapIterable.reject, org.eclipse.collections.api.map.MapIterable.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 MutableList<V>
reject(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.reject, org.eclipse.collections.api.map.MutableMapIterable.reject, org.eclipse.collections.api.RichIterable.reject.

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

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.rejectWith, org.eclipse.collections.api.map.MutableMapIterable.rejectWith, org.eclipse.collections.api.RichIterable.rejectWith.

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

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.select, org.eclipse.collections.api.map.MutableMapIterable.select, org.eclipse.collections.api.map.MapIterable.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 MutableList<V>
select(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.select, org.eclipse.collections.api.map.MutableMapIterable.select, org.eclipse.collections.api.RichIterable.select.

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

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.selectWith, org.eclipse.collections.api.map.MutableMapIterable.selectWith, org.eclipse.collections.api.RichIterable.selectWith.

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

public MutableSortedMap<K, V>
public ImmutableSortedMap<K, V>
public MutableStack<V>
toStack()

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.toStack.

Converts the OrderedIterable to a mutable MutableStack implementation.

public MutableSortedMap<K, V>
public MutableSortedMap<K, V>
withAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.withAllKeyValues, org.eclipse.collections.api.map.MutableMapIterable.withAllKeyValues.

This method allows mutable, fixed size, and immutable maps the ability to add elements to their existing elements.

public MutableSortedMap<K, V>
withKeyValue(K key, V value)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.withKeyValue, org.eclipse.collections.api.map.MutableMapIterable.withKeyValue.

This method allows mutable, fixed size, and immutable maps the ability to add elements to their existing elements.

public MutableSortedMap<K, V>
withoutAllKeys(Iterable<? extends K> keys)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.withoutAllKeys, org.eclipse.collections.api.map.MutableMapIterable.withoutAllKeys.

This method allows mutable, fixed size, and immutable maps the ability to remove elements from their existing elements.

public MutableSortedMap<K, V>
withoutKey(K key)

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.withoutKey, org.eclipse.collections.api.map.MutableMapIterable.withoutKey.

This method allows mutable, fixed size, and immutable maps the ability to remove elements from their existing elements.

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.zip, org.eclipse.collections.api.map.MutableMapIterable.zip, org.eclipse.collections.api.RichIterable.zip.

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

public MutableList<Pair<V, Integer>>
Inherited from org.eclipse.collections.impl.map.mutable.AbstractMutableMapIterable:
aggregateBycollectcountBycountByEachcountByWithdetectdetectOptionalflipUniqueValuesgetIfAbsentPutgetIfAbsentPutgetIfAbsentPutWithgetIfAbsentPutWithKeyiteratorkeysViewkeyValuesViewreduceBysumByDoublesumByFloatsumByIntsumByLongupdateValueupdateValueWithvaluesView