Top Description Methods
org.eclipse.collections.api.stack.primitive

public Interface MutableShortStack

extends ShortStack
Imports
org.eclipse.collections.api.block.function.primitive.ShortIntToObjectFunction, .ShortToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.ShortIntPredicate, .ShortPredicate, org.eclipse.collections.api.block.procedure.primitive.ShortProcedure, org.eclipse.collections.api.list.primitive.ShortList, org.eclipse.collections.api.stack.MutableStack

This file was automatically generated from template file mutablePrimitiveStack.stg.
Since
3.0.

Method Summary

Modifier and TypeMethod and Description
public MutableShortStack
public MutableShortStack
public void
clear()

Clears the Stack

public <V> MutableStack<V>
collect(ShortToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.stack.primitive.ShortStack.collect.

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

public default <V> MutableStack<V>
collectWithIndex(ShortIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.stack.primitive.ShortStack.collectWithIndex.

Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.

public default MutableShortStack
newEmpty()

Creates a new empty mutable version of the same stack type.

public short
pop()

Removes and returns the top element of the stack.

public ShortList
pop(int count)

Removes and returns a ShortList of the number of elements specified by the count, beginning with the top of the stack.

public void
push(short item)

Adds an item to the top of the stack.

public MutableShortStack
reject(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.stack.primitive.ShortStack.reject.

Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.

public default MutableShortStack
rejectWithIndex(ShortIntPredicate predicate)

Overrides default org.eclipse.collections.api.stack.primitive.ShortStack.rejectWithIndex.

Returns a new MutableShortStack excluding all elements with corresponding indexes matching the specified predicate.

public MutableShortStack
select(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.stack.primitive.ShortStack.select.

Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.

public default MutableShortStack
selectWithIndex(ShortIntPredicate predicate)

Overrides default org.eclipse.collections.api.stack.primitive.ShortStack.selectWithIndex.

Returns a new MutableShortStack including all elements with corresponding indexes matching the specified predicate.

public default MutableShortStack
Inherited from org.eclipse.collections.api.stack.primitive.ShortStack:
equalshashCodepeekpeekpeekAttoImmutable

Method Detail

asSynchronizedback to summary
public MutableShortStack asSynchronized()
asUnmodifiableback to summary
public MutableShortStack asUnmodifiable()
clearback to summary
public void clear()

Clears the Stack

collectback to summary
public <V> MutableStack<V> collect(ShortToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.stack.primitive.ShortStack.collect.

Doc from org.eclipse.collections.api.ShortIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.

Annotations
@Override
collectWithIndexback to summary
public default <V> MutableStack<V> collectWithIndex(ShortIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.stack.primitive.ShortStack.collectWithIndex.

Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.

Annotations
@Override
Since
9.1.
newEmptyback to summary
public default MutableShortStack newEmpty()

Creates a new empty mutable version of the same stack type.

Since
9.2.
popback to summary
public short pop()

Removes and returns the top element of the stack.

popback to summary
public ShortList pop(int count)

Removes and returns a ShortList of the number of elements specified by the count, beginning with the top of the stack.

pushback to summary
public void push(short item)

Adds an item to the top of the stack.

rejectback to summary
public MutableShortStack reject(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.stack.primitive.ShortStack.reject.

Doc from org.eclipse.collections.api.ShortIterable.reject.

Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.

Annotations
@Override
rejectWithIndexback to summary
public default MutableShortStack rejectWithIndex(ShortIntPredicate predicate)

Overrides default org.eclipse.collections.api.stack.primitive.ShortStack.rejectWithIndex.

Returns a new MutableShortStack excluding all elements with corresponding indexes matching the specified predicate.

Annotations
@Override
Since
11.1.
selectback to summary
public MutableShortStack select(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.stack.primitive.ShortStack.select.

Doc from org.eclipse.collections.api.ShortIterable.select.

Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.

Annotations
@Override
selectWithIndexback to summary
public default MutableShortStack selectWithIndex(ShortIntPredicate predicate)

Overrides default org.eclipse.collections.api.stack.primitive.ShortStack.selectWithIndex.

Returns a new MutableShortStack including all elements with corresponding indexes matching the specified predicate.

Annotations
@Override
Since
11.1.
tapback to summary
public default MutableShortStack tap(ShortProcedure procedure)

Overrides default org.eclipse.collections.api.stack.primitive.ShortStack.tap.

Annotations
@Override
Since
9.0.