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) 2018 Goldman Sachs and others.
 * 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.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.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
{
    @Override
    OrderedMap tap(Procedure procedure);

    @Override
    OrderedMap flipUniqueValues();

    @Override
    ListMultimap flip();

    @Override
    OrderedMap select(Predicate2 predicate);

    @Override
    OrderedMap reject(Predicate2 predicate);

    @Override
     OrderedMap collect(Function2> function);

    @Override
     OrderedMap collectValues(Function2 function);

    @Override
    ImmutableOrderedMap toImmutable();

    @Override
    OrderedMap toReversed();

    @Override
    OrderedMap take(int count);

    @Override
    OrderedMap takeWhile(Predicate predicate);

    @Override
    OrderedMap drop(int count);

    @Override
    OrderedMap dropWhile(Predicate predicate);

    @Override
    PartitionList partitionWhile(Predicate predicate);

    @Override
    ListIterable distinct();

    @Override
    ListIterable select(Predicate predicate);

    @Override
    

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

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

PartitionList partitionWith(Predicate2 predicate, P parameter); @Override BooleanList collectBoolean(BooleanFunction booleanFunction); @Override ByteList collectByte(ByteFunction byteFunction); @Override CharList collectChar(CharFunction charFunction); @Override DoubleList collectDouble(DoubleFunction doubleFunction); @Override FloatList collectFloat(FloatFunction floatFunction); @Override IntList collectInt(IntFunction intFunction); @Override LongList collectLong(LongFunction longFunction); @Override ShortList collectShort(ShortFunction shortFunction); @Override ListIterable> zip(Iterable that); @Override ListIterable> zipWithIndex(); @Override ListIterable collect(Function function); @Override ListIterable collectWith(Function2 function, P parameter); @Override ListIterable collectIf(Predicate predicate, Function function); @Override ListIterable selectInstancesOf(Class clazz); @Override ListIterable flatCollect(Function> function); /** * @since 9.2 */ @Override default ListIterable flatCollectWith(Function2> function, P parameter) { return this.flatCollect(each -> function.apply(each, parameter)); } @Override ListMultimap groupBy(Function function); @Override ListMultimap groupByEach(Function> function); @Override OrderedMap groupByUniqueKey(Function function); }