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

public Class UnmodifiableTreeMap<K, V>

extends UnmodifiableSortedMap<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
Imports
java.util.Collection, .Comparator, .Iterator, .Map, .Optional, .Set, .SortedMap, org.eclipse.collections.api.BooleanIterable, .ByteIterable, .CharIterable, .DoubleIterable, .FloatIterable, .IntIterable, .LazyIterable, .LongIterable, .RichIterable, .ShortIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.bag.sorted.MutableSortedBag, org.eclipse.collections.api.bimap.MutableBiMap, org.eclipse.collections.api.block.function.Function, .Function0, .Function2, org.eclipse.collections.api.block.function.primitive.BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .DoubleObjectToDoubleFunction, .FloatFunction, .FloatObjectToFloatFunction, .IntFunction, .IntObjectToIntFunction, .LongFunction, .LongObjectToLongFunction, .ObjectIntToObjectFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure, org.eclipse.collections.api.collection.MutableCollection, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection, .MutableByteCollection, .MutableCharCollection, .MutableDoubleCollection, .MutableFloatCollection, .MutableIntCollection, .MutableLongCollection, .MutableShortCollection, org.eclipse.collections.api.factory.SortedMaps, org.eclipse.collections.api.factory.primitive.ObjectDoubleMaps, .ObjectLongMaps, 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.MapIterable, .MutableMap, .MutableMapIterable, .MutableOrderedMap, org.eclipse.collections.api.map.primitive.MutableObjectDoubleMap, .MutableObjectLongMap, org.eclipse.collections.api.map.sorted.ImmutableSortedMap, .MutableSortedMap, org.eclipse.collections.api.multimap.MutableMultimap, 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.set.MutableSet, org.eclipse.collections.api.set.sorted.MutableSortedSet, org.eclipse.collections.api.stack.MutableStack, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.UnmodifiableIteratorAdapter, org.eclipse.collections.impl.block.factory.PrimitiveFunctions, org.eclipse.collections.impl.collection.mutable.UnmodifiableMutableCollection, org.eclipse.collections.impl.set.mutable.UnmodifiableMutableSet, org.eclipse.collections.impl.tuple.AbstractImmutableEntry, org.eclipse.collections.impl.utility.LazyIterate

An unmodifiable view of a map.
See Also
MutableSortedMap#asUnmodifiable()

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public V
add(Pair<? extends K, ? extends V> keyValuePair)

Overrides default org.eclipse.collections.api.map.MutableMapIterable.add.

This method allows mutable map the ability to add an element in the form of Pair<?

public boolean
allSatisfy(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.allSatisfy.

Returns true if the predicate evaluates to true for every element of the iterable or if the iterable is empty.

public <P> boolean
allSatisfyWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.allSatisfyWith.

Returns true if the predicate evaluates to true for every element of the collection, or returns false.

public boolean
anySatisfy(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.anySatisfy.

Returns true if the predicate evaluates to true for any element of the iterable.

public <P> boolean
anySatisfyWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.anySatisfyWith.

Returns true if the predicate evaluates to true for any element of the collection, or return false.

public void
appendString(Appendable appendable)

Overrides default org.eclipse.collections.api.RichIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String separator)

Overrides default org.eclipse.collections.api.RichIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.RichIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyIterable<V>
asLazy()

Implements org.eclipse.collections.api.RichIterable.asLazy.

Returns a lazy (deferred) iterable, most likely implemented by calling LazyIterate.adapt(this).

public MutableSortedMap<K, V>
asSynchronized()

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

Returns a synchronized wrapper backed by this map.

public MutableSortedMap<K, V>
asUnmodifiable()

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

Returns an unmodifiable view of this map.

public RichIterable<RichIterable<V>>
chunk(int size)

Implements org.eclipse.collections.api.RichIterable.chunk.

Partitions elements in fixed size chunks.

public MutableSortedMap<K, V>
clone()

Overrides java.lang.Object.clone.

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

Creates and returns a copy of this object.

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

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

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

public <R, C extends Collection<R>> C
collect(Function<? super V, ? extends R> function, C target)

Implements org.eclipse.collections.api.RichIterable.collect.

Same as collect(Function), except that the results are gathered into the specified target collection.

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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.

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

public <R extends MutableBooleanCollection> R
collectBoolean(BooleanFunction<? super V> booleanFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectBoolean.

Same as collectBoolean(BooleanFunction), except that the results are gathered into the specified target collection.

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

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

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

public <R extends MutableByteCollection> R
collectByte(ByteFunction<? super V> byteFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectByte.

Same as collectByte(ByteFunction), except that the results are gathered into the specified target collection.

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

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

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

public <R extends MutableCharCollection> R
collectChar(CharFunction<? super V> charFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectChar.

Same as collectChar(CharFunction), except that the results are gathered into the specified target collection.

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

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

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

public <R extends MutableDoubleCollection> R
collectDouble(DoubleFunction<? super V> doubleFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectDouble.

Same as collectDouble(DoubleFunction), except that the results are gathered into the specified target collection.

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

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

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

public <R extends MutableFloatCollection> R
collectFloat(FloatFunction<? super V> floatFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectFloat.

Same as collectFloat(FloatFunction), except that the results are gathered into the specified target collection.

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

Implements org.eclipse.collections.api.RichIterable.collectIf.

Same as the collectIf method with two parameters but uses the specified target collection for the results.

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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.

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

public <R extends MutableIntCollection> R
collectInt(IntFunction<? super V> intFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectInt.

Same as collectInt(IntFunction), except that the results are gathered into the specified target 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>
collectKeysUnique(Function2<? super K, ? super V, ? extends R> function)

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

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

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

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

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

public <R extends MutableLongCollection> R
collectLong(LongFunction<? super V> longFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectLong.

Same as collectLong(LongFunction), except that the results are gathered into the specified target collection.

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

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

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

public <R extends MutableShortCollection> R
collectShort(ShortFunction<? super V> shortFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectShort.

Same as collectShort(ShortFunction), except that the results are gathered into the specified target collection.

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

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

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

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.

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

public <P, R, C extends Collection<R>> C
collectWith(Function2<? super V, ? super P, ? extends R> function, P parameter, C targetCollection)

Implements org.eclipse.collections.api.RichIterable.collectWith.

Same as collectWith but with a targetCollection parameter to gather the results.

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

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

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

public <V1, R extends Collection<V1>> R
collectWithIndex(ObjectIntToObjectFunction<? super V, ? extends V1> function, R target)

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

Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.

public boolean
contains(Object object)

Implements org.eclipse.collections.api.RichIterable.contains.

Returns true if the iterable has an element which responds true to element.equals(object).

public boolean
containsAll(Collection<?> source)

Implements org.eclipse.collections.api.RichIterable.containsAll.

Returns true if all elements in source are contained in this collection.

public boolean
containsAllArguments(Object... elements)

Implements org.eclipse.collections.api.RichIterable.containsAllArguments.

Returns true if all elements in the specified var arg array are contained in this collection.

public boolean
containsAllIterable(Iterable<?> source)

Implements org.eclipse.collections.api.RichIterable.containsAllIterable.

Returns true if all elements in source are contained in this collection.

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
count(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.count.

Return the total number of elements that answer true to the specified predicate.

public <P> int
countWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.countWith.

Returns the total number of elements that evaluate to true for the specified predicate.

public Pair<K, V>
detect(Predicate2<? super K, ? super V> predicate)

Implements org.eclipse.collections.api.map.MapIterable.detect.

Return the first key and value of the map for which the predicate evaluates to true when they are given as arguments.

public V
detect(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.detect.

Returns the first element of the iterable for which the predicate evaluates to true or null in the case where no element returns true.

public V
detectIfNone(Predicate<? super V> predicate, Function0<? extends V> function)

Overrides default org.eclipse.collections.api.RichIterable.detectIfNone.

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

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 Optional<Pair<K, V>>
detectOptional(Predicate2<? super K, ? super V> predicate)

Implements org.eclipse.collections.api.map.MapIterable.detectOptional.

Return the first key and value of the map as an Optional for which the predicate evaluates to true when they are given as arguments.

public Optional<V>
detectOptional(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.detectOptional.

Returns the first element of the iterable for which the predicate evaluates to true as an Optional.

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

Implements org.eclipse.collections.api.RichIterable.detectWith.

Returns the first element that evaluates to true for the specified predicate2 and parameter, or null if none evaluate to true.

public <P> V
detectWithIfNone(Predicate2<? super V, ? super P> predicate, P parameter, Function0<? extends V> function)

Implements org.eclipse.collections.api.RichIterable.detectWithIfNone.

Returns the first element of the iterable that evaluates to true for the specified predicate2 and parameter, or returns the value of evaluating the specified function.

public <P> Optional<V>
detectWithOptional(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.detectWithOptional.

Returns the first element that evaluates to true for the specified predicate2 and parameter as an Optional.

public MutableList<V>
distinct()

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

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

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

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

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

Returns the final elements that do not satisfy the Predicate.

public void
each(Procedure<? super V> procedure)

Implements org.eclipse.collections.api.RichIterable.each.

The procedure is executed for each element in the iterable.

public MutableSet<Map.Entry<K, V>>
public boolean
public <R, C extends Collection<R>> C
flatCollect(Function<? super V, ? extends Iterable<R>> function, C target)

Implements org.eclipse.collections.api.RichIterable.flatCollect.

Same as flatCollect, only the results are collected into the target collection.

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

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

flatCollect is a special case of collect(Function).

public <R extends MutableBooleanCollection> R
flatCollectBoolean(Function<? super V, ? extends BooleanIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectBoolean.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableByteCollection> R
flatCollectByte(Function<? super V, ? extends ByteIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectByte.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableCharCollection> R
flatCollectChar(Function<? super V, ? extends CharIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectChar.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableDoubleCollection> R
flatCollectDouble(Function<? super V, ? extends DoubleIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectDouble.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableFloatCollection> R
flatCollectFloat(Function<? super V, ? extends FloatIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectFloat.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableIntCollection> R
flatCollectInt(Function<? super V, ? extends IntIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectInt.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableLongCollection> R
flatCollectLong(Function<? super V, ? extends LongIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectLong.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableShortCollection> R
flatCollectShort(Function<? super V, ? extends ShortIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectShort.

Same as flatCollect, only the results are collected into the target collection.

public MutableSortedSetMultimap<V, K>
flip()

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

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

public MutableMapIterable<V, K>
flipUniqueValues()

Implements org.eclipse.collections.api.map.MutableMapIterable.flipUniqueValues, org.eclipse.collections.api.map.MapIterable.flipUniqueValues.

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

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
forEachKey(Procedure<? super K> procedure)

Implements org.eclipse.collections.api.map.MapIterable.forEachKey.

Calls the procedure with each key of the map.

public void
forEachKeyValue(Procedure2<? super K, ? super V> procedure)

Implements org.eclipse.collections.api.map.MapIterable.forEachKeyValue.

Calls the procedure with each key-value pair of the map.

public void
forEachValue(Procedure<? super V> procedure)

Implements org.eclipse.collections.api.map.MapIterable.forEachValue.

Calls the procedure with each value of the map.

public <P> void
forEachWith(Procedure2<? super V, ? super P> procedure, P parameter)

Implements org.eclipse.collections.api.InternalIterable.forEachWith.

The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.

public void
forEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)

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

Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.

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 V
public V
getIfAbsent(K key, Function0<? extends V> function)

Implements org.eclipse.collections.api.map.MapIterable.getIfAbsent.

Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified Function0.

public V
getIfAbsentPut(K key, Function0<? extends V> function)

Implements org.eclipse.collections.api.map.MutableMapIterable.getIfAbsentPut, org.eclipse.collections.api.map.MutableMapIterable.getIfAbsentPut.

Get and return the value in the Map at the specified key.

public V
getIfAbsentPut(K key, V value)

Implements org.eclipse.collections.api.map.MutableMapIterable.getIfAbsentPut.

Get and return the value in the Map at the specified key.

public <P> V
getIfAbsentPutWith(K key, Function<? super P, ? extends V> function, P parameter)

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

Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified one argument Function using the specified parameter, and put that value in the map at the specified key.

public V
getIfAbsentPutWithKey(K key, Function<? super K, ? extends V> function)

Implements org.eclipse.collections.api.map.MutableMapIterable.getIfAbsentPutWithKey.

Get and return the value in the Map at the specified key.

public V
getIfAbsentValue(K key, V value)

Implements org.eclipse.collections.api.map.MapIterable.getIfAbsentValue.

Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return value.

public <P> V
getIfAbsentWith(K key, Function<? super P, ? extends V> function, P parameter)

Implements org.eclipse.collections.api.map.MapIterable.getIfAbsentWith.

Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified function and parameter.

public V
protected MutableSortedMap<K, V>
public V
getOnly()

Overrides default org.eclipse.collections.api.RichIterable.getOnly.

Returns the element if the iterable has exactly one element.

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 <R, C extends MutableMultimap<R, V>> C
groupBy(Function<? super V, ? extends R> function, C target)

Implements org.eclipse.collections.api.RichIterable.groupBy.

Same as groupBy(Function), except that the results are gathered into the specified target multimap.

public <R> MutableListMultimap<R, V>
groupByEach(Function<? super V, ? extends Iterable<R>> function)

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

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

public <R, C extends MutableMultimap<R, V>> C
groupByEach(Function<? super V, ? extends Iterable<R>> function, C target)

Implements org.eclipse.collections.api.RichIterable.groupByEach.

Same as groupByEach(Function), except that the results are gathered into the specified target multimap.

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

Overrides default org.eclipse.collections.api.map.sorted.MutableSortedMap.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 <VV, R extends MutableMapIterable<VV, V>> R
groupByUniqueKey(Function<? super V, ? extends VV> function, R target)

Implements org.eclipse.collections.api.RichIterable.groupByUniqueKey.

Same as groupByUniqueKey(Function), except that the results are gathered into the specified target map.

public int
public MutableSortedMap<K, V>
headMap(K toKey)

Overrides org.eclipse.collections.impl.map.sorted.mutable.UnmodifiableSortedMap.headMap.

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.headMap, java.util.SortedMap.headMap.

Returns a view of the portion of this map whose keys are strictly less than toKey.

public <A> A
ifPresentApply(K key, Function<? super V, ? extends A> function)

Implements org.eclipse.collections.api.map.MapIterable.ifPresentApply.

If there is a value in the Map that corresponds to the specified key return the result of applying the specified Function on the value, otherwise return null.

public <IV> IV
injectInto(IV injectedValue, Function2<? super IV, ? super V, ? extends IV> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public int
injectInto(int injectedValue, IntObjectToIntFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final int result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public long
injectInto(long injectedValue, LongObjectToLongFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final long result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public double
injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final double result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public float
injectInto(float injectedValue, FloatObjectToFloatFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.injectInto.

Returns the final float result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public <R extends Collection<V>> R
into(R target)

Implements org.eclipse.collections.api.RichIterable.into.

Adds all the elements in this iterable to the specific target Collection.

private boolean
isAbsent(V result, K key)

public Iterator<V>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public MutableSet<K>
keySet()

Overrides org.eclipse.collections.impl.UnmodifiableMap.keySet.

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.keySet, java.util.SortedMap.keySet, java.util.Map.keySet.

The underlying set for the keys is sorted in ascending order according to their natural ordering or a custom comparator.

public RichIterable<K>
keysView()

Implements org.eclipse.collections.api.map.MapIterable.keysView.

Returns an unmodifiable lazy iterable wrapped around the keySet for the map.

public RichIterable<Pair<K, V>>
keyValuesView()

Implements org.eclipse.collections.api.map.MapIterable.keyValuesView.

Returns an unmodifiable lazy iterable of key/value pairs wrapped around the entrySet for the map.

public String
makeString()

Overrides default org.eclipse.collections.api.RichIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String) and defaulting the separator parameter to the characters ", " (comma and space).

public String
makeString(String separator)

Overrides default org.eclipse.collections.api.RichIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String, String, String) and defaulting the start and end parameters to "" (the empty String).

public String
makeString(String start, String separator, String end)

Overrides default org.eclipse.collections.api.RichIterable.makeString.

Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.

public V
max()

Implements org.eclipse.collections.api.RichIterable.max, org.eclipse.collections.api.ordered.OrderedIterable.max.

Returns the maximum element out of this container based on the natural order.

public V
max(Comparator<? super V> comparator)

Implements org.eclipse.collections.api.RichIterable.max.

Returns the maximum element out of this container based on the comparator.

public <R extends Comparable<? super R>> V
maxBy(Function<? super V, ? extends R> function)

Implements org.eclipse.collections.api.RichIterable.maxBy.

Returns the maximum elements out of this container based on the natural order of the attribute returned by Function.

public V
min()

Implements org.eclipse.collections.api.RichIterable.min, org.eclipse.collections.api.ordered.OrderedIterable.min.

Returns the minimum element out of this container based on the natural order.

public V
min(Comparator<? super V> comparator)

Implements org.eclipse.collections.api.RichIterable.min.

Returns the minimum element out of this container based on the comparator.

public <R extends Comparable<? super R>> V
minBy(Function<? super V, ? extends R> function)

Implements org.eclipse.collections.api.RichIterable.minBy.

Returns the minimum elements out of this container based on the natural order of the attribute returned by Function.

public MutableSortedMap<K, V>
newEmpty()

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

Creates a new instance of the same type with the same internal Comparator.

public boolean
noneSatisfy(Predicate<? super V> predicate)

Implements org.eclipse.collections.api.RichIterable.noneSatisfy.

Returns true if the predicate evaluates to false for every element of the iterable or if the iterable is empty.

public <P> boolean
noneSatisfyWith(Predicate2<? super V, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.noneSatisfyWith.

Returns true if the predicate evaluates to false for every element of the collection, or return false.

public boolean
notEmpty()

Overrides default org.eclipse.collections.api.RichIterable.notEmpty.

The English equivalent of !this.isEmpty()

public static <K, V, M extends SortedMap<K, V>> UnmodifiableTreeMap<K, V>
of(M map)

This method will take a MutableSortedMap and wrap it directly in a UnmodifiableMutableMap.

public PartitionMutableList<V>
partition(Predicate<? super V> predicate)

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

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

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

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

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

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

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

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

public void
public V
putPair(Pair<? extends K, ? extends V> keyValuePair)

Overrides default org.eclipse.collections.api.map.MutableMapIterable.putPair.

This method allows mutable map the ability to add an element in the form of Pair<?

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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 <R extends Collection<V>> R
reject(Predicate<? super V> predicate, R target)

Implements org.eclipse.collections.api.RichIterable.reject.

Same as the reject method with one parameter but uses the specified target collection for the results.

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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.

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

public <P, R extends Collection<V>> R
rejectWith(Predicate2<? super V, ? super P> predicate, P parameter, R targetCollection)

Implements org.eclipse.collections.api.RichIterable.rejectWith.

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

public boolean
removeAllKeys(Set<? extends K> keys)

Overrides default org.eclipse.collections.api.map.MutableMapIterable.removeAllKeys.

Remove entries from the map at the specified keys.

public boolean
removeIf(Predicate2<? super K, ? super V> predicate)

Overrides default org.eclipse.collections.api.map.MutableMapIterable.removeIf.

Remove an entry from the map if the predicate evaluates to true.

public V
removeKey(K key)

Implements org.eclipse.collections.api.map.MutableMapIterable.removeKey.

Remove an entry from the map at the specified key.

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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.

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

public <R extends Collection<V>> R
select(Predicate<? super V> predicate, R target)

Implements org.eclipse.collections.api.RichIterable.select.

Same as the select method with one parameter but uses the specified target collection for the results.

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

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

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

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

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

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

public <P, R extends Collection<V>> R
selectWith(Predicate2<? super V, ? super P> predicate, P parameter, R targetCollection)

Implements org.eclipse.collections.api.RichIterable.selectWith.

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

public MutableSortedMap<K, V>
subMap(K fromKey, K toKey)

Overrides org.eclipse.collections.impl.map.sorted.mutable.UnmodifiableSortedMap.subMap.

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.subMap, java.util.SortedMap.subMap.

Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.

public <V1> MutableObjectDoubleMap<V1>
sumByDouble(Function<? super V, ? extends V1> groupBy, DoubleFunction<? super V> function)

Implements org.eclipse.collections.api.map.MutableMapIterable.sumByDouble, org.eclipse.collections.api.RichIterable.sumByDouble.

Groups and sums the values using the two specified functions.

public <V1> MutableObjectDoubleMap<V1>
sumByFloat(Function<? super V, ? extends V1> groupBy, FloatFunction<? super V> function)

Implements org.eclipse.collections.api.map.MutableMapIterable.sumByFloat, org.eclipse.collections.api.RichIterable.sumByFloat.

Groups and sums the values using the two specified functions.

public <V1> MutableObjectLongMap<V1>
sumByInt(Function<? super V, ? extends V1> groupBy, IntFunction<? super V> function)

Implements org.eclipse.collections.api.map.MutableMapIterable.sumByInt, org.eclipse.collections.api.RichIterable.sumByInt.

Groups and sums the values using the two specified functions.

public <V1> MutableObjectLongMap<V1>
sumByLong(Function<? super V, ? extends V1> groupBy, LongFunction<? super V> function)

Implements org.eclipse.collections.api.map.MutableMapIterable.sumByLong, org.eclipse.collections.api.RichIterable.sumByLong.

Groups and sums the values using the two specified functions.

public double
sumOfDouble(DoubleFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumOfDouble.

Returns the final double result of evaluating function for each element of the iterable and adding the results together.

public double
sumOfFloat(FloatFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumOfFloat.

Returns the final double result of evaluating function for each element of the iterable and adding the results together.

public long
sumOfInt(IntFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumOfInt.

Returns the final long result of evaluating function for each element of the iterable and adding the results together.

public long
sumOfLong(LongFunction<? super V> function)

Implements org.eclipse.collections.api.RichIterable.sumOfLong.

Returns the final long result of evaluating function for each element of the iterable and adding the results together.

public MutableSortedMap<K, V>
tailMap(K fromKey)

Overrides org.eclipse.collections.impl.map.sorted.mutable.UnmodifiableSortedMap.tailMap.

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.tailMap, java.util.SortedMap.tailMap.

Returns a view of the portion of this map whose keys are greater than or equal to fromKey.

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

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

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

Returns the initial elements that satisfy the Predicate.

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

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

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

public Object[]
toArray()

Overrides default org.eclipse.collections.api.RichIterable.toArray.

Converts this iterable to an array.

public <T> T[]
toArray(T[] a)

Overrides default org.eclipse.collections.api.RichIterable.toArray.

Converts this iterable to an array using the specified target array, assuming the target array is as long or longer than the iterable.

public MutableBag<V>
toBag()

Implements org.eclipse.collections.api.RichIterable.toBag.

Converts the collection to the default MutableBag implementation.

public <NK, NV> MutableBiMap<NK, NV>
toBiMap(Function<? super V, ? extends NK> keyFunction, Function<? super V, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toBiMap.

Converts the collection to a BiMap implementation using the specified key and value functions.

public ImmutableSortedMap<K, V>
public MutableList<V>
toList()

Implements org.eclipse.collections.api.RichIterable.toList.

Converts the collection to a MutableList implementation.

public <NK, NV> MutableMap<NK, NV>
toMap(Function<? super V, ? extends NK> keyFunction, Function<? super V, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toMap.

Converts the collection to a MutableMap implementation using the specified key and value functions.

public <NK, NV, R extends Map<NK, NV>> R
toMap(Function<? super V, ? extends NK> keyFunction, Function<? super V, ? extends NV> valueFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.toMap.

Same as toMap(Function, Function), except that the results are gathered into the specified target map.

public MutableSortedMap<K, V>
toReversed()

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

Returns a new ReversibleIterable in reverse order.

public MutableSet<V>
toSet()

Implements org.eclipse.collections.api.RichIterable.toSet.

Converts the collection to a MutableSet implementation.

public MutableSortedBag<V>
toSortedBag()

Implements org.eclipse.collections.api.RichIterable.toSortedBag.

Converts the collection to a MutableSortedBag implementation and sorts it using the natural order of the elements.

public MutableSortedBag<V>
toSortedBag(Comparator<? super V> comparator)

Implements org.eclipse.collections.api.RichIterable.toSortedBag.

Converts the collection to the MutableSortedBag implementation and sorts it using the specified comparator.

public MutableList<V>
toSortedList()

Overrides default org.eclipse.collections.api.RichIterable.toSortedList.

Converts the collection to a MutableList implementation and sorts it using the natural order of the elements.

public MutableList<V>
toSortedList(Comparator<? super V> comparator)

Overrides default org.eclipse.collections.api.RichIterable.toSortedList.

Converts the collection to a MutableList implementation and sorts it using the specified comparator.

public <NK, NV> MutableSortedMap<NK, NV>
toSortedMap(Function<? super V, ? extends NK> keyFunction, Function<? super V, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toSortedMap.

Converts the collection to a MutableSortedMap implementation using the specified key and value functions sorted by the key elements' natural ordering.

public <NK, NV> MutableSortedMap<NK, NV>
toSortedMap(Comparator<? super NK> comparator, Function<? super V, ? extends NK> keyFunction, Function<? super V, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toSortedMap.

Converts the collection to a MutableSortedMap implementation using the specified key and value functions sorted by the given comparator.

public MutableSortedSet<V>
toSortedSet()

Implements org.eclipse.collections.api.RichIterable.toSortedSet.

Converts the collection to a MutableSortedSet implementation and sorts it using the natural order of the elements.

public MutableSortedSet<V>
toSortedSet(Comparator<? super V> comparator)

Implements org.eclipse.collections.api.RichIterable.toSortedSet.

Converts the collection to a MutableSortedSet implementation and sorts it using the specified comparator.

public MutableStack<V>
toStack()

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

Converts the OrderedIterable to a mutable MutableStack implementation.

public V
updateValue(K key, Function0<? extends V> factory, Function<? super V, ? extends V> function)

Implements org.eclipse.collections.api.map.MutableMapIterable.updateValue.

Looks up the value associated with key, applies the function to it, and replaces the value.

public <P> V
updateValueWith(K key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter)

Implements org.eclipse.collections.api.map.MutableMapIterable.updateValueWith.

Same as updateValue(Object, Function0, Function) with a Function2 and specified parameter which is passed to the function.

public MutableCollection<V>
public RichIterable<V>
valuesView()

Implements org.eclipse.collections.api.map.MapIterable.valuesView.

Returns an unmodifiable lazy iterable wrapped around the values for the map.

public MutableSortedMap<K, V>
public MutableSortedMap<K, V>
withAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValuePairs)

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

Convenience var-args version of withAllKeyValues

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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.

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

public MutableSortedMap<K, V>
withMap(Map<? extends K, ? extends V> map)

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

Similar to putAll(Map), but returns this instead of void

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

Implements org.eclipse.collections.api.map.sorted.MutableSortedMap.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.

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

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

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

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

public <R extends Collection<Pair<V, Integer>>> R
public MutableList<Pair<V, Integer>>
zipWithIndex()

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

Zips this RichIterable with its indices.

Inherited from org.eclipse.collections.impl.map.sorted.mutable.UnmodifiableSortedMap:
comparatorfirstKeygetSortedMaplastKey