All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.collections.api.map.OrderedMap Maven / Gradle / Ivy

There is a newer version: 12.0.0.M3
Show newest version
/*
 * 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 procedure);

    OrderedMap flipUniqueValues();

    ListMultimap flip();

    OrderedMap select(Predicate2 predicate);

    OrderedMap reject(Predicate2 predicate);

     OrderedMap collect(Function2> function);

     OrderedMap collectValues(Function2 function);

    ImmutableOrderedMap toImmutable();

    OrderedMap toReversed();

    OrderedMap take(int count);

    OrderedMap takeWhile(Predicate predicate);

    OrderedMap drop(int count);

    OrderedMap dropWhile(Predicate predicate);

    PartitionList partitionWhile(Predicate predicate);

    ListIterable distinct();

    ListIterable select(Predicate predicate);

    

ListIterable selectWith(Predicate2 predicate, P parameter); ListIterable reject(Predicate predicate);

ListIterable rejectWith(Predicate2 predicate, P parameter); PartitionList partition(Predicate predicate);

PartitionList partitionWith(Predicate2 predicate, P parameter); BooleanList collectBoolean(BooleanFunction booleanFunction); ByteList collectByte(ByteFunction byteFunction); CharList collectChar(CharFunction charFunction); DoubleList collectDouble(DoubleFunction doubleFunction); FloatList collectFloat(FloatFunction floatFunction); IntList collectInt(IntFunction intFunction); LongList collectLong(LongFunction longFunction); ShortList collectShort(ShortFunction shortFunction); ListIterable> zip(Iterable that); ListIterable> zipWithIndex(); ListIterable collectWith(Function2 function, P parameter); ListIterable collectIf(Predicate predicate, Function function); ListIterable selectInstancesOf(Class clazz); ListIterable flatCollect(Function> function); ListMultimap groupBy(Function function); ListMultimap groupByEach(Function> function); OrderedMap groupByUniqueKey(Function function); OrderedMap aggregateInPlaceBy(Function groupBy, Function0 zeroValueFactory, Procedure2 mutatingAggregator); OrderedMap aggregateBy(Function groupBy, Function0 zeroValueFactory, Function2 nonMutatingAggregator); }