package org.eclipse.collections.api.map.sorted;
import java.util.Map;
import java.util.SortedMap;
import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.block.function.Function2;
import org.eclipse.collections.api.block.function.primitive.BooleanFunction;
import org.eclipse.collections.api.block.function.primitive.ByteFunction;
import org.eclipse.collections.api.block.function.primitive.CharFunction;
import org.eclipse.collections.api.block.function.primitive.DoubleFunction;
import org.eclipse.collections.api.block.function.primitive.FloatFunction;
import org.eclipse.collections.api.block.function.primitive.IntFunction;
import org.eclipse.collections.api.block.function.primitive.LongFunction;
import org.eclipse.collections.api.block.function.primitive.ObjectIntToObjectFunction;
import org.eclipse.collections.api.block.function.primitive.ShortFunction;
import org.eclipse.collections.api.block.predicate.Predicate;
import org.eclipse.collections.api.block.predicate.Predicate2;
import org.eclipse.collections.api.block.procedure.Procedure;
import org.eclipse.collections.api.collection.MutableCollection;
import org.eclipse.collections.api.factory.Maps;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.list.primitive.MutableBooleanList;
import org.eclipse.collections.api.list.primitive.MutableByteList;
import org.eclipse.collections.api.list.primitive.MutableCharList;
import org.eclipse.collections.api.list.primitive.MutableDoubleList;
import org.eclipse.collections.api.list.primitive.MutableFloatList;
import org.eclipse.collections.api.list.primitive.MutableIntList;
import org.eclipse.collections.api.list.primitive.MutableLongList;
import org.eclipse.collections.api.list.primitive.MutableShortList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.map.MutableMapIterable;
import org.eclipse.collections.api.multimap.list.MutableListMultimap;
import org.eclipse.collections.api.multimap.sortedset.MutableSortedSetMultimap;
import org.eclipse.collections.api.partition.list.PartitionMutableList;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.tuple.Pair;
public interface MutableSortedMap<K, V>
extends MutableMapIterable<K, V>, SortedMapIterable<K, V>, SortedMap<K, V>, Cloneable
{
@Override
MutableSortedMap<K, V> newEmpty();
<E> MutableSortedMap<K, V> collectKeysAndValues(
Iterable<E> iterable,
Function<? super E, ? extends K> keyFunction,
Function<? super E, ? extends V> valueFunction);
@Override
<P> V getIfAbsentPutWith(K key, Function<? super P, ? extends V> function, P parameter);
@Override
MutableSortedMap<K, V> asUnmodifiable();
@Override
MutableSortedMap<K, V> asSynchronized();
@Override
MutableSortedSetMultimap<V, K> flip();
@Override
MutableSortedMap<K, V> select(Predicate2<? super K, ? super V> predicate);
@Override
MutableSortedMap<K, V> reject(Predicate2<? super K, ? super V> predicate);
@Override
<K2, V2> MutableMap<K2, V2> collect(Function2<? super K, ? super V, Pair<K2, V2>> function);
@Override
<R> MutableSortedMap<K, R> collectValues(Function2<? super K, ? super V, ? extends R> function);
@Override
<R> MutableList<R> collect(Function<? super V, ? extends R> function);
@Override
default <R> MutableList<R> collectWithIndex(ObjectIntToObjectFunction<? super V, ? extends R> function)
{
int[] index = {0};
return this.collect(each -> function.valueOf(each, index[0]++));
}
@Override
MutableBooleanList collectBoolean(BooleanFunction<? super V> booleanFunction);
@Override
MutableByteList collectByte(ByteFunction<? super V> byteFunction);
@Override
MutableCharList collectChar(CharFunction<? super V> charFunction);
@Override
MutableDoubleList collectDouble(DoubleFunction<? super V> doubleFunction);
@Override
MutableFloatList collectFloat(FloatFunction<? super V> floatFunction);
@Override
MutableIntList collectInt(IntFunction<? super V> intFunction);
@Override
MutableLongList collectLong(LongFunction<? super V> longFunction);
@Override
MutableShortList collectShort(ShortFunction<? super V> shortFunction);
@Override
<P, VV> MutableList<VV> collectWith(Function2<? super V, ? super P, ? extends VV> function, P parameter);
@Override
<R> MutableList<R> collectIf(Predicate<? super V> predicate, Function<? super V, ? extends R> function);
@Override
<R> MutableList<R> flatCollect(Function<? super V, ? extends Iterable<R>> function);
@Override
default <P, R> MutableList<R> flatCollectWith(Function2<? super V, ? super P, ? extends Iterable<R>> function, P parameter)
{
return this.flatCollect(each -> function.apply(each, parameter));
}
@Override
MutableSortedMap<K, V> tap(Procedure<? super V> procedure);
@Override
MutableList<V> select(Predicate<? super V> predicate);
@Override
<P> MutableList<V> selectWith(Predicate2<? super V, ? super P> predicate, P parameter);
@Override
MutableList<V> reject(Predicate<? super V> predicate);
@Override
<P> MutableList<V> rejectWith(Predicate2<? super V, ? super P> predicate, P parameter);
@Override
PartitionMutableList<V> partition(Predicate<? super V> predicate);
@Override
<P> PartitionMutableList<V> partitionWith(Predicate2<? super V, ? super P> predicate, P parameter);
@Override
<S> MutableList<S> selectInstancesOf(Class<S> clazz);
@Override
<S> MutableList<Pair<V, S>> zip(Iterable<S> that);
@Override
MutableList<Pair<V, Integer>> zipWithIndex();
@Override
MutableSortedMap<K, V> toReversed();
@Override
MutableSortedMap<K, V> take(int count);
@Override
MutableSortedMap<K, V> takeWhile(Predicate<? super V> predicate);
@Override
MutableSortedMap<K, V> drop(int count);
@Override
MutableSortedMap<K, V> dropWhile(Predicate<? super V> predicate);
@Override
PartitionMutableList<V> partitionWhile(Predicate<? super V> predicate);
@Override
MutableList<V> distinct();
@Override
MutableSet<Entry<K, V>> entrySet();
@Override
MutableSet<K> keySet();
@Override
MutableSortedMap<K, V> headMap(K toKey);
@Override
MutableSortedMap<K, V> tailMap(K fromKey);
@Override
MutableSortedMap<K, V> subMap(K fromKey, K toKey);
@Override
MutableCollection<V> values();
MutableSortedMap<K, V> clone();
@Override
<VV> MutableListMultimap<VV, V> groupBy(Function<? super V, ? extends VV> function);
@Override
<VV> MutableListMultimap<VV, V> groupByEach(Function<? super V, ? extends Iterable<VV>> function);
@Override
default <VV> MutableMap<VV, V> groupByUniqueKey(Function<? super V, ? extends VV> function)
{
return this.groupByUniqueKey(function, Maps.mutable.withInitialCapacity(this.size()));
}
@Override
MutableSortedMap<K, V> withKeyValue(K key, V value);
@Override
default MutableSortedMap<K, V> withMap(Map<? extends K, ? extends V> map)
{
this.putAll(map);
return this;
}
@Override
MutableSortedMap<K, V> withAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues);
@Override
MutableSortedMap<K, V> withAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValuePairs);
@Deprecated
default MutableSortedMap<K, V> with(Pair<K, V>... pairs)
{
return this.withAllKeyValueArguments(pairs);
}
@Override
MutableSortedMap<K, V> withoutKey(K key);
@Override
MutableSortedMap<K, V> withoutAllKeys(Iterable<? extends K> keys);
}