Top Fields Constructors Methods
org.eclipse.collections.impl.stack.immutable

pack-priv final Class ImmutableEmptyStack<T>

extends AbstractRichIterable<T>
implements ImmutableStack<T>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.eclipse.collections.api.stack.ImmutableStack, org.eclipse.collections.api.stack.StackIterable, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.InternalIterable, java.lang.Iterable
Imports
java.io.Serializable, java.util.Collection, .Comparator, .EmptyStackException, .Iterator, .Map, .NoSuchElementException, .Optional, org.eclipse.collections.api.BooleanIterable, .ByteIterable, .CharIterable, .DoubleIterable, .FloatIterable, .IntIterable, .LongIterable, .RichIterable, .ShortIterable, org.eclipse.collections.api.bag.ImmutableBag, org.eclipse.collections.api.block.function.Function, .Function0, .Function2, org.eclipse.collections.api.block.function.primitive.BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .FloatFunction, .IntFunction, .LongFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection, .MutableByteCollection, .MutableCharCollection, .MutableDoubleCollection, .MutableFloatCollection, .MutableIntCollection, .MutableLongCollection, .MutableShortCollection, org.eclipse.collections.api.factory.Bags, .Lists, .Maps, .Stacks, org.eclipse.collections.api.factory.primitive.BooleanStacks, .ByteStacks, .CharStacks, .DoubleStacks, .FloatStacks, .IntStacks, .LongStacks, .ObjectDoubleMaps, .ObjectLongMaps, .ShortStacks, org.eclipse.collections.api.list.ListIterable, org.eclipse.collections.api.map.ImmutableMap, .MutableMapIterable, org.eclipse.collections.api.map.primitive.ImmutableObjectDoubleMap, .ImmutableObjectLongMap, org.eclipse.collections.api.multimap.MutableMultimap, org.eclipse.collections.api.multimap.list.ImmutableListMultimap, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.partition.list.PartitionImmutableList, org.eclipse.collections.api.partition.stack.PartitionImmutableStack, org.eclipse.collections.api.stack.ImmutableStack, .MutableStack, .StackIterable, org.eclipse.collections.api.stack.primitive.ImmutableBooleanStack, .ImmutableByteStack, .ImmutableCharStack, .ImmutableDoubleStack, .ImmutableFloatStack, .ImmutableIntStack, .ImmutableLongStack, .ImmutableShortStack, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.AbstractRichIterable, .EmptyIterator, org.eclipse.collections.impl.factory.Multimaps, org.eclipse.collections.impl.partition.list.PartitionFastList, org.eclipse.collections.impl.tuple.Tuples

Field Summary

Modifier and TypeField and Description
private static final PartitionImmutableList<?>
pack-priv static final ImmutableStack<?>
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public <K, V> ImmutableMap<K, V>
aggregateBy(Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V, ? super T, ? extends V> nonMutatingAggregator)

Overrides default org.eclipse.collections.api.stack.ImmutableStack.aggregateBy, org.eclipse.collections.api.RichIterable.aggregateBy.

Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function.

public <K, V> ImmutableMap<K, V>
aggregateInPlaceBy(Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V, ? super T> mutatingAggregator)

Overrides default org.eclipse.collections.api.stack.ImmutableStack.aggregateInPlaceBy, org.eclipse.collections.api.RichIterable.aggregateInPlaceBy.

Applies an aggregate procedure over the iterable grouping results into a Map based on the specific groupBy function.

private void
checkNegativeCount(int count)

private boolean
checkZeroCount(int count)

public RichIterable<RichIterable<T>>
chunk(int size)

Implements org.eclipse.collections.api.RichIterable.chunk.

Partitions elements in fixed size chunks.

public <V> ImmutableStack<V>
collect(Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.stack.ImmutableStack.collect, org.eclipse.collections.api.RichIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public <V, R extends Collection<V>> R
collect(Function<? super T, ? extends V> function, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.collect.

Implements org.eclipse.collections.api.RichIterable.collect.

Same as collect(Function), except that the results are gathered into the specified target collection.

public ImmutableBooleanStack
collectBoolean(BooleanFunction<? super T> booleanFunction)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectBoolean, org.eclipse.collections.api.RichIterable.collectBoolean.

Returns a new primitive boolean iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableBooleanCollection> R
collectBoolean(BooleanFunction<? super T> booleanFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectBoolean.

Same as collectBoolean(BooleanFunction), except that the results are gathered into the specified target collection.

public ImmutableByteStack
collectByte(ByteFunction<? super T> byteFunction)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectByte, org.eclipse.collections.api.RichIterable.collectByte.

Returns a new primitive byte iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableByteCollection> R
collectByte(ByteFunction<? super T> byteFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectByte.

Same as collectByte(ByteFunction), except that the results are gathered into the specified target collection.

public ImmutableCharStack
collectChar(CharFunction<? super T> charFunction)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectChar, org.eclipse.collections.api.RichIterable.collectChar.

Returns a new primitive char iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableCharCollection> R
collectChar(CharFunction<? super T> charFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectChar.

Same as collectChar(CharFunction), except that the results are gathered into the specified target collection.

public ImmutableDoubleStack
collectDouble(DoubleFunction<? super T> doubleFunction)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectDouble, org.eclipse.collections.api.RichIterable.collectDouble.

Returns a new primitive double iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableDoubleCollection> R
collectDouble(DoubleFunction<? super T> doubleFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectDouble.

Same as collectDouble(DoubleFunction), except that the results are gathered into the specified target collection.

public ImmutableFloatStack
collectFloat(FloatFunction<? super T> floatFunction)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectFloat, org.eclipse.collections.api.RichIterable.collectFloat.

Returns a new primitive float iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableFloatCollection> R
collectFloat(FloatFunction<? super T> floatFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectFloat.

Same as collectFloat(FloatFunction), except that the results are gathered into the specified target collection.

public <V> ImmutableStack<V>
collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectIf, org.eclipse.collections.api.RichIterable.collectIf.

Returns a new collection with the results of applying the specified function on each element of the source collection, but only for those elements which return true upon evaluation of the predicate.

public <V, R extends Collection<V>> R
collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.collectIf.

Implements org.eclipse.collections.api.RichIterable.collectIf.

Same as the collectIf method with two parameters but uses the specified target collection for the results.

public ImmutableIntStack
collectInt(IntFunction<? super T> intFunction)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectInt, org.eclipse.collections.api.RichIterable.collectInt.

Returns a new primitive int iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableIntCollection> R
collectInt(IntFunction<? super T> intFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectInt.

Same as collectInt(IntFunction), except that the results are gathered into the specified target collection.

public ImmutableLongStack
collectLong(LongFunction<? super T> longFunction)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectLong, org.eclipse.collections.api.RichIterable.collectLong.

Returns a new primitive long iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableLongCollection> R
collectLong(LongFunction<? super T> longFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectLong.

Same as collectLong(LongFunction), except that the results are gathered into the specified target collection.

public ImmutableShortStack
collectShort(ShortFunction<? super T> shortFunction)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectShort, org.eclipse.collections.api.RichIterable.collectShort.

Returns a new primitive short iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableShortCollection> R
collectShort(ShortFunction<? super T> shortFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectShort.

Same as collectShort(ShortFunction), except that the results are gathered into the specified target collection.

public <P, V> ImmutableStack<V>
collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter)

Implements org.eclipse.collections.api.stack.ImmutableStack.collectWith, org.eclipse.collections.api.RichIterable.collectWith.

Same as collect(Function) with a Function2 and specified parameter which is passed to the block.

public <P, V, R extends Collection<V>> R
collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.collectWith.

Implements org.eclipse.collections.api.RichIterable.collectWith.

Same as collectWith but with a targetCollection parameter to gather the results.

public <S> boolean
corresponds(OrderedIterable<S> other, Predicate2<? super T, ? super S> predicate)

Implements org.eclipse.collections.api.ordered.OrderedIterable.corresponds.

Returns true if both OrderedIterables have the same length and predicate returns true for all corresponding elements e1 of this OrderedIterable and e2 of other.

public int
count(Predicate<? super T> predicate)

Overrides org.eclipse.collections.impl.AbstractRichIterable.count.

Implements org.eclipse.collections.api.RichIterable.count.

Return the total number of elements that answer true to the specified predicate.

public <V> ImmutableBag<V>
countByEach(Function<? super T, ? extends Iterable<V>> function)

Overrides org.eclipse.collections.impl.AbstractRichIterable.countByEach.

Overrides default org.eclipse.collections.api.stack.ImmutableStack.countByEach, org.eclipse.collections.api.RichIterable.countByEach.

This method will count the number of occurrences of each value calculated by applying the function to each element of the collection.

public <P> int
countWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.AbstractRichIterable.countWith.

Implements org.eclipse.collections.api.RichIterable.countWith.

Returns the total number of elements that evaluate to true for the specified predicate.

public T
detect(Predicate<? super T> predicate)

Overrides org.eclipse.collections.impl.AbstractRichIterable.detect.

Implements org.eclipse.collections.api.RichIterable.detect.

Returns the first element of the iterable for which the predicate evaluates to true or null in the case where no element returns true.

public T
detectIfNone(Predicate<? super T> predicate, Function0<? extends T> function)

Overrides default org.eclipse.collections.api.RichIterable.detectIfNone.

Returns the first element of the iterable for which the predicate evaluates to true.

public int
detectIndex(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.ordered.OrderedIterable.detectIndex.

Returns the index of the first element of the OrderedIterable for which the predicate evaluates to true.

public Optional<T>
detectOptional(Predicate<? super T> predicate)

Overrides org.eclipse.collections.impl.AbstractRichIterable.detectOptional.

Implements org.eclipse.collections.api.RichIterable.detectOptional.

Returns the first element of the iterable for which the predicate evaluates to true as an Optional.

public <P> T
detectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.AbstractRichIterable.detectWith.

Implements org.eclipse.collections.api.RichIterable.detectWith.

Returns the first element that evaluates to true for the specified predicate2 and parameter, or null if none evaluate to true.

public <P> T
detectWithIfNone(Predicate2<? super T, ? super P> predicate, P parameter, Function0<? extends T> function)

Overrides org.eclipse.collections.impl.AbstractRichIterable.detectWithIfNone.

Implements org.eclipse.collections.api.RichIterable.detectWithIfNone.

Returns the first element of the iterable that evaluates to true for the specified predicate2 and parameter, or returns the value of evaluating the specified function.

public <P> Optional<T>
detectWithOptional(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.AbstractRichIterable.detectWithOptional.

Implements org.eclipse.collections.api.RichIterable.detectWithOptional.

Returns the first element that evaluates to true for the specified predicate2 and parameter as an Optional.

public ImmutableStack<T>
distinct()

Implements org.eclipse.collections.api.stack.ImmutableStack.distinct.

Returns a new OrderedIterable containing the distinct elements in this iterable.

public ImmutableStack<T>
dropWhile(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.ImmutableStack.dropWhile.

Returns the final elements that do not satisfy the Predicate.

public void
each(Procedure<? super T> procedure)

Implements org.eclipse.collections.api.RichIterable.each.

The procedure is executed for each element in the iterable.

public boolean
equals(Object o)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.stack.StackIterable.equals.

Follows the same general contract as List#equals(Object), but for Stacks.

public <V> ImmutableStack<V>
public <V, R extends Collection<V>> R
flatCollect(Function<? super T, ? extends Iterable<V>> function, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.flatCollect.

Implements org.eclipse.collections.api.RichIterable.flatCollect.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableBooleanCollection> R
flatCollectBoolean(Function<? super T, ? extends BooleanIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectBoolean.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableByteCollection> R
flatCollectByte(Function<? super T, ? extends ByteIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectByte.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableCharCollection> R
flatCollectChar(Function<? super T, ? extends CharIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectChar.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableDoubleCollection> R
flatCollectDouble(Function<? super T, ? extends DoubleIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectDouble.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableFloatCollection> R
flatCollectFloat(Function<? super T, ? extends FloatIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectFloat.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableIntCollection> R
flatCollectInt(Function<? super T, ? extends IntIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectInt.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableLongCollection> R
flatCollectLong(Function<? super T, ? extends LongIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectLong.

Same as flatCollect, only the results are collected into the target collection.

public <R extends MutableShortCollection> R
flatCollectShort(Function<? super T, ? extends ShortIterable> function, R target)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectShort.

Same as flatCollect, only the results are collected into the target collection.

public void
forEach(int startIndex, int endIndex, Procedure<? super T> procedure)

Implements org.eclipse.collections.api.ordered.OrderedIterable.forEach.

Iterates over the section of the iterable covered by the specified inclusive indexes.

public <P> void
forEachWith(Procedure2<? super T, ? super P> procedure, P parameter)

Overrides org.eclipse.collections.impl.AbstractRichIterable.forEachWith.

Implements org.eclipse.collections.api.InternalIterable.forEachWith.

The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.

public void
forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)

Overrides org.eclipse.collections.impl.AbstractRichIterable.forEachWithIndex.

Implements org.eclipse.collections.api.ordered.OrderedIterable.forEachWithIndex, org.eclipse.collections.api.InternalIterable.forEachWithIndex.

Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure

e.g.
people.forEachWithIndex((person, index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));
public void
forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure)

Implements org.eclipse.collections.api.ordered.OrderedIterable.forEachWithIndex.

Iterates over the section of the iterable covered by the specified inclusive indexes.

public T
public T
public <V> ImmutableListMultimap<V, T>
groupBy(Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.stack.ImmutableStack.groupBy, org.eclipse.collections.api.RichIterable.groupBy.

For each element of the iterable, the function is evaluated and the results of these evaluations are collected into a new multimap, where the transformed value is the key and the original values are added to the same (or similar) species of collection as the source iterable.

public <V, R extends MutableMultimap<V, T>> R
groupBy(Function<? super T, ? extends V> function, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.groupBy.

Implements org.eclipse.collections.api.RichIterable.groupBy.

Same as groupBy(Function), except that the results are gathered into the specified target multimap.

public <V> ImmutableListMultimap<V, T>
groupByEach(Function<? super T, ? extends Iterable<V>> function)

Implements org.eclipse.collections.api.stack.ImmutableStack.groupByEach, org.eclipse.collections.api.RichIterable.groupByEach.

Similar to groupBy(Function), except the result of evaluating function will return a collection of keys for each value.

public <V, R extends MutableMultimap<V, T>> R
groupByEach(Function<? super T, ? extends Iterable<V>> function, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.groupByEach.

Implements org.eclipse.collections.api.RichIterable.groupByEach.

Same as groupByEach(Function), except that the results are gathered into the specified target multimap.

public <V> ImmutableMap<V, T>
groupByUniqueKey(Function<? super T, ? extends V> function)

Overrides default org.eclipse.collections.api.stack.ImmutableStack.groupByUniqueKey.

Implements org.eclipse.collections.api.RichIterable.groupByUniqueKey.

For each element of the iterable, the function is evaluated, and the results of these evaluations are collected into a new map, where the transformed value is the key.

public <V, R extends MutableMapIterable<V, T>> R
groupByUniqueKey(Function<? super T, ? extends V> function, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.groupByUniqueKey.

Implements org.eclipse.collections.api.RichIterable.groupByUniqueKey.

Same as groupByUniqueKey(Function), except that the results are gathered into the specified target map.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements org.eclipse.collections.api.stack.StackIterable.hashCode.

Follows the same general contract as List#hashCode(), but for Stacks.

public boolean
public <R extends Collection<T>> R
into(R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.into.

Implements org.eclipse.collections.api.RichIterable.into.

Adds all the elements in this iterable to the specific target Collection.

public boolean
public Iterator<T>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public T
max(Comparator<? super T> comparator)

Overrides org.eclipse.collections.impl.AbstractRichIterable.max.

Implements org.eclipse.collections.api.RichIterable.max.

Returns the maximum element out of this container based on the comparator.

public T
max()

Overrides org.eclipse.collections.impl.AbstractRichIterable.max.

Implements org.eclipse.collections.api.ordered.OrderedIterable.max, org.eclipse.collections.api.RichIterable.max.

Returns the maximum element out of this container based on the natural order, not the order of this container.

public <V extends Comparable<? super V>> T
maxBy(Function<? super T, ? extends V> function)

Overrides org.eclipse.collections.impl.AbstractRichIterable.maxBy.

Implements org.eclipse.collections.api.RichIterable.maxBy.

Returns the maximum elements out of this container based on the natural order of the attribute returned by Function.

public T
min(Comparator<? super T> comparator)

Overrides org.eclipse.collections.impl.AbstractRichIterable.min.

Implements org.eclipse.collections.api.RichIterable.min.

Returns the minimum element out of this container based on the comparator.

public T
min()

Overrides org.eclipse.collections.impl.AbstractRichIterable.min.

Implements org.eclipse.collections.api.ordered.OrderedIterable.min, org.eclipse.collections.api.RichIterable.min.

Returns the minimum element out of this container based on the natural order, not the order of this container.

public <V extends Comparable<? super V>> T
minBy(Function<? super T, ? extends V> function)

Overrides org.eclipse.collections.impl.AbstractRichIterable.minBy.

Implements org.eclipse.collections.api.RichIterable.minBy.

Returns the minimum elements out of this container based on the natural order of the attribute returned by Function.

public boolean
notEmpty()

Overrides default org.eclipse.collections.api.RichIterable.notEmpty.

The English equivalent of !this.isEmpty()

public PartitionImmutableStack<T>
partition(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.ImmutableStack.partition, org.eclipse.collections.api.RichIterable.partition.

Filters a collection into a PartitionedIterable based on the evaluation of the predicate.

public PartitionImmutableStack<T>
partitionWhile(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.ImmutableStack.partitionWhile.

Returns a Partition of the initial elements that satisfy the Predicate and the remaining elements.

public <P> PartitionImmutableStack<T>
partitionWith(Predicate2<? super T, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.stack.ImmutableStack.partitionWith, org.eclipse.collections.api.RichIterable.partitionWith.

Filters a collection into a PartitionIterable based on the evaluation of the predicate.

public T
peek()

Implements org.eclipse.collections.api.stack.StackIterable.peek.

Returns the element at the top of the stack, without removing it from the stack.

public ListIterable<T>
public Pair<T, ImmutableStack<T>>
public Pair<ListIterable<T>, ImmutableStack<T>>
public T
peekAt(int index)

Implements org.eclipse.collections.api.stack.StackIterable.peekAt.

Returns the element at a specific index, without removing it from the stack.

public ImmutableStack<T>
public ImmutableStack<T>
public ImmutableStack<T>
private Object
public <K> ImmutableMap<K, T>
reduceBy(Function<? super T, ? extends K> groupBy, Function2<? super T, ? super T, ? extends T> reduceFunction)

Overrides default org.eclipse.collections.api.stack.ImmutableStack.reduceBy, org.eclipse.collections.api.RichIterable.reduceBy.

Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function.

public ImmutableStack<T>
reject(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.ImmutableStack.reject, org.eclipse.collections.api.RichIterable.reject.

Returns all elements of the source collection that return false when evaluating of the predicate.

public <R extends Collection<T>> R
reject(Predicate<? super T> predicate, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.reject.

Implements org.eclipse.collections.api.RichIterable.reject.

Same as the reject method with one parameter but uses the specified target collection for the results.

public <P> ImmutableStack<T>
rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.stack.ImmutableStack.rejectWith, org.eclipse.collections.api.RichIterable.rejectWith.

Similar to reject(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

public <P, R extends Collection<T>> R
rejectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.rejectWith.

Implements org.eclipse.collections.api.RichIterable.rejectWith.

Similar to reject(Predicate, Collection), except with an evaluation parameter for the second generic argument in Predicate2.

public ImmutableStack<T>
select(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.ImmutableStack.select, org.eclipse.collections.api.RichIterable.select.

Returns all elements of the source collection that return true when evaluating the predicate.

public <R extends Collection<T>> R
select(Predicate<? super T> predicate, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.select.

Implements org.eclipse.collections.api.RichIterable.select.

Same as the select method with one parameter but uses the specified target collection for the results.

public <S> ImmutableStack<S>
selectInstancesOf(Class<S> clazz)

Implements org.eclipse.collections.api.stack.ImmutableStack.selectInstancesOf, org.eclipse.collections.api.RichIterable.selectInstancesOf.

Returns all elements of the source collection that are instances of the Class clazz.

public <P> ImmutableStack<T>
selectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.stack.ImmutableStack.selectWith, org.eclipse.collections.api.RichIterable.selectWith.

Similar to select(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

public <P, R extends Collection<T>> R
selectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target)

Overrides org.eclipse.collections.impl.AbstractRichIterable.selectWith.

Implements org.eclipse.collections.api.RichIterable.selectWith.

Similar to select(Predicate, Collection), except with an evaluation parameter for the second generic argument in Predicate2.

public int
public <V> ImmutableObjectDoubleMap<V>
sumByDouble(Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function)

Implements org.eclipse.collections.api.stack.ImmutableStack.sumByDouble, org.eclipse.collections.api.RichIterable.sumByDouble.

Groups and sums the values using the two specified functions.

public <V> ImmutableObjectDoubleMap<V>
sumByFloat(Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function)

Implements org.eclipse.collections.api.stack.ImmutableStack.sumByFloat, org.eclipse.collections.api.RichIterable.sumByFloat.

Groups and sums the values using the two specified functions.

public <V> ImmutableObjectLongMap<V>
sumByInt(Function<? super T, ? extends V> groupBy, IntFunction<? super T> function)

Implements org.eclipse.collections.api.stack.ImmutableStack.sumByInt, org.eclipse.collections.api.RichIterable.sumByInt.

Groups and sums the values using the two specified functions.

public <V> ImmutableObjectLongMap<V>
sumByLong(Function<? super T, ? extends V> groupBy, LongFunction<? super T> function)

Implements org.eclipse.collections.api.stack.ImmutableStack.sumByLong, org.eclipse.collections.api.RichIterable.sumByLong.

Groups and sums the values using the two specified functions.

public ImmutableStack<T>
takeWhile(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.ImmutableStack.takeWhile.

Returns the initial elements that satisfy the Predicate.

public ImmutableStack<T>
tap(Procedure<? super T> procedure)

Implements org.eclipse.collections.api.stack.ImmutableStack.tap, org.eclipse.collections.api.RichIterable.tap.

Executes the Procedure for each element in the iterable and returns this.

public ImmutableStack<T>
toImmutable()

Implements org.eclipse.collections.api.stack.StackIterable.toImmutable.

Converts the StackIterable to an immutable implementation.

public <NK, NV, R extends Map<NK, NV>> R
toMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.toMap.

Same as toMap(Function, Function), except that the results are gathered into the specified target map.

public MutableStack<T>
toStack()

Overrides default org.eclipse.collections.api.stack.StackIterable.toStack.

Converts the stack to a MutableStack implementation.

private Object
public <S> ImmutableStack<Pair<T, S>>
zip(Iterable<S> that)

Implements org.eclipse.collections.api.stack.ImmutableStack.zip, org.eclipse.collections.api.RichIterable.zip.

Returns a OrderedIterable formed from this OrderedIterable and another Iterable by combining corresponding elements in pairs.

public <S, R extends Collection<Pair<T, S>>> R
public ImmutableStack<Pair<T, Integer>>
public <R extends Collection<Pair<T, Integer>>> R
Inherited from org.eclipse.collections.impl.AbstractRichIterable:
allSatisfyallSatisfyWithanySatisfyanySatisfyWithappendStringappendStringasLazycontainscontainsAllcontainsAllArgumentscontainsAllIterableforEachinjectIntoinjectIntoinjectIntoinjectIntoinjectIntononeSatisfynoneSatisfyWithsumOfDoublesumOfFloatsumOfIntsumOfLongtoBagtoBiMaptoListtoMaptoSettoSortedBagtoSortedBagtoSortedBagBytoSortedListBytoSortedMaptoSortedMaptoSortedMapBytoSortedSettoSortedSettoSortedSetBytoString