
org.eclipse.collections.api.stack.ImmutableStack 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.stack;
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.map.ImmutableMap;
import org.eclipse.collections.api.multimap.list.ImmutableListMultimap;
import org.eclipse.collections.api.partition.stack.PartitionImmutableStack;
import org.eclipse.collections.api.stack.primitive.ImmutableBooleanStack;
import org.eclipse.collections.api.stack.primitive.ImmutableByteStack;
import org.eclipse.collections.api.stack.primitive.ImmutableCharStack;
import org.eclipse.collections.api.stack.primitive.ImmutableDoubleStack;
import org.eclipse.collections.api.stack.primitive.ImmutableFloatStack;
import org.eclipse.collections.api.stack.primitive.ImmutableIntStack;
import org.eclipse.collections.api.stack.primitive.ImmutableLongStack;
import org.eclipse.collections.api.stack.primitive.ImmutableShortStack;
import org.eclipse.collections.api.tuple.Pair;
public interface ImmutableStack extends StackIterable
{
ImmutableStack push(T item);
ImmutableStack pop();
ImmutableStack pop(int count);
ImmutableStack tap(Procedure super T> procedure);
ImmutableStack select(Predicate super T> predicate);
ImmutableStack selectWith(Predicate2 super T, ? super P> predicate, P parameter);
ImmutableStack reject(Predicate super T> predicate);
ImmutableStack rejectWith(Predicate2 super T, ? super P> predicate, P parameter);
PartitionImmutableStack partition(Predicate super T> predicate);
PartitionImmutableStack partitionWith(Predicate2 super T, ? super P> predicate, P parameter);
ImmutableStack collect(Function super T, ? extends V> function);
ImmutableBooleanStack collectBoolean(BooleanFunction super T> booleanFunction);
ImmutableByteStack collectByte(ByteFunction super T> byteFunction);
ImmutableCharStack collectChar(CharFunction super T> charFunction);
ImmutableDoubleStack collectDouble(DoubleFunction super T> doubleFunction);
ImmutableFloatStack collectFloat(FloatFunction super T> floatFunction);
ImmutableIntStack collectInt(IntFunction super T> intFunction);
ImmutableLongStack collectLong(LongFunction super T> longFunction);
ImmutableShortStack collectShort(ShortFunction super T> shortFunction);
ImmutableStack collectWith(Function2 super T, ? super P, ? extends V> function, P parameter);
ImmutableStack collectIf(Predicate super T> predicate, Function super T, ? extends V> function);
ImmutableStack flatCollect(Function super T, ? extends Iterable> function);
ImmutableListMultimap groupBy(Function super T, ? extends V> function);
ImmutableListMultimap groupByEach(Function super T, ? extends Iterable> function);
ImmutableMap groupByUniqueKey(Function super T, ? extends V> function);
ImmutableStack> zip(Iterable that);
ImmutableStack> zipWithIndex();
/**
* Size takes linear time on ImmutableStacks.
*/
int size();
}