
org.eclipse.collections.api.map.OrderedMap Maven / Gradle / Ivy
/*
* Copyright (c) 2015 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*/
package org.eclipse.collections.api.map;
import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.block.function.Function0;
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.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.block.procedure.Procedure2;
import org.eclipse.collections.api.list.ListIterable;
import org.eclipse.collections.api.list.primitive.BooleanList;
import org.eclipse.collections.api.list.primitive.ByteList;
import org.eclipse.collections.api.list.primitive.CharList;
import org.eclipse.collections.api.list.primitive.DoubleList;
import org.eclipse.collections.api.list.primitive.FloatList;
import org.eclipse.collections.api.list.primitive.IntList;
import org.eclipse.collections.api.list.primitive.LongList;
import org.eclipse.collections.api.list.primitive.ShortList;
import org.eclipse.collections.api.multimap.list.ListMultimap;
import org.eclipse.collections.api.ordered.ReversibleIterable;
import org.eclipse.collections.api.partition.list.PartitionList;
import org.eclipse.collections.api.tuple.Pair;
/**
* A map whose keys are ordered but not necessarily sorted, for example a linked hash map.
*/
public interface OrderedMap
extends MapIterable, ReversibleIterable
{
OrderedMap tap(Procedure super V> procedure);
OrderedMap flipUniqueValues();
ListMultimap flip();
OrderedMap select(Predicate2 super K, ? super V> predicate);
OrderedMap reject(Predicate2 super K, ? super V> predicate);
OrderedMap collect(Function2 super K, ? super V, Pair> function);
OrderedMap collectValues(Function2 super K, ? super V, ? extends R> function);
ImmutableOrderedMap toImmutable();
OrderedMap toReversed();
OrderedMap take(int count);
OrderedMap takeWhile(Predicate super V> predicate);
OrderedMap drop(int count);
OrderedMap dropWhile(Predicate super V> predicate);
PartitionList partitionWhile(Predicate super V> predicate);
ListIterable distinct();
ListIterable select(Predicate super V> predicate);
ListIterable selectWith(Predicate2 super V, ? super P> predicate, P parameter);
ListIterable reject(Predicate super V> predicate);
ListIterable rejectWith(Predicate2 super V, ? super P> predicate, P parameter);
PartitionList partition(Predicate super V> predicate);
PartitionList partitionWith(Predicate2 super V, ? super P> predicate, P parameter);
BooleanList collectBoolean(BooleanFunction super V> booleanFunction);
ByteList collectByte(ByteFunction super V> byteFunction);
CharList collectChar(CharFunction super V> charFunction);
DoubleList collectDouble(DoubleFunction super V> doubleFunction);
FloatList collectFloat(FloatFunction super V> floatFunction);
IntList collectInt(IntFunction super V> intFunction);
LongList collectLong(LongFunction super V> longFunction);
ShortList collectShort(ShortFunction super V> shortFunction);
ListIterable> zip(Iterable that);
ListIterable> zipWithIndex();
ListIterable collectWith(Function2 super V, ? super P, ? extends V1> function, P parameter);
ListIterable collectIf(Predicate super V> predicate, Function super V, ? extends V1> function);
ListIterable selectInstancesOf(Class clazz);
ListIterable flatCollect(Function super V, ? extends Iterable> function);
ListMultimap groupBy(Function super V, ? extends V1> function);
ListMultimap groupByEach(Function super V, ? extends Iterable> function);
OrderedMap groupByUniqueKey(Function super V, ? extends V1> function);
OrderedMap aggregateInPlaceBy(Function super V, ? extends KK> groupBy, Function0 extends VV> zeroValueFactory, Procedure2 super VV, ? super V> mutatingAggregator);
OrderedMap aggregateBy(Function super V, ? extends KK> groupBy, Function0 extends VV> zeroValueFactory, Function2 super VV, ? super V, ? extends VV> nonMutatingAggregator);
}