Top Description Fields Constructors Methods
org.eclipse.collections.impl.stack.mutable.primitive

public Class IntArrayStack

extends AbstractIntStack
implements MutableIntStack, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.stack.primitive.MutableIntStack, org.eclipse.collections.api.stack.primitive.IntStack, org.eclipse.collections.api.ordered.primitive.OrderedIntIterable, org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.PrimitiveIterable
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.block.function.primitive.IntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, org.eclipse.collections.api.iterator.IntIterator, org.eclipse.collections.api.list.primitive.IntList, .MutableIntList, org.eclipse.collections.api.stack.MutableStack, org.eclipse.collections.api.stack.primitive.IntStack, .ImmutableIntStack, .MutableIntStack, org.eclipse.collections.impl.factory.primitive.IntStacks, org.eclipse.collections.impl.list.mutable.primitive.IntArrayList, org.eclipse.collections.impl.stack.primitive.AbstractIntStack, org.eclipse.collections.impl.stack.mutable.ArrayStack

IntArrayStack is similar to ArrayStack, and is memory-optimized for int primitives. This file was automatically generated from template file primitiveArrayStack.stg.

Field Summary

Modifier and TypeField and Description
private transient IntArrayList
private static final long

Constructor Summary

AccessConstructor and Description
public
private
IntArrayStack(int size)

private
IntArrayStack(int... items)

Method Summary

Modifier and TypeMethod and Description
public MutableIntStack
public MutableIntStack
public void
public <V> MutableStack<V>
collect(IntToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.collect, org.eclipse.collections.api.stack.primitive.IntStack.collect.

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

public boolean
protected IntArrayList
public int
public IntArrayStack
newEmpty()

Overrides default org.eclipse.collections.api.stack.primitive.MutableIntStack.newEmpty.

Creates a new empty IntArrayStack.

public static IntArrayStack
public static IntArrayStack
public static IntArrayStack
public static IntArrayStack
newStackWith(int... items)

public int
pop()

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.pop.

Removes and returns the top element of the stack.

public IntList
pop(int count)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.pop.

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

public void
push(int item)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.push.

Adds an item to the top of the stack.

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

public MutableIntStack
reject(IntPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.reject, org.eclipse.collections.api.stack.primitive.IntStack.reject.

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

public MutableIntStack
select(IntPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.select, org.eclipse.collections.api.stack.primitive.IntStack.select.

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

public ImmutableIntStack
public MutableIntList
public MutableIntStack
toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.toStack.

Converts the collection to a IntStack.

public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.eclipse.collections.impl.stack.primitive.AbstractIntStack:
allSatisfyanySatisfyappendStringappendStringappendStringasLazyaveragecheckEmptyStackcheckPositiveValueForCountcheckSizeLessThanCountchunkcontainscontainsAllcontainsAllcountdetectIfNoneeachforEachWithIndexgetFirstindexOfinjectIntoinjectIntoWithIndexintIteratormakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfypeekpeekpeekAtrangeChecksizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoString

Field Detail

delegateback to summary
private transient IntArrayList delegate
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

IntArrayStackback to summary
public IntArrayStack()
IntArrayStackback to summary
private IntArrayStack(int size)
IntArrayStackback to summary
private IntArrayStack(int... items)

Method Detail

asSynchronizedback to summary
public MutableIntStack asSynchronized()

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableIntStack asUnmodifiable()

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.asUnmodifiable.

Annotations
@Override
clearback to summary
public void clear()

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.clear.

Doc from org.eclipse.collections.api.stack.primitive.MutableIntStack.clear.

Clears the Stack

Annotations
@Override
collectback to summary
public <V> MutableStack<V> collect(IntToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.collect, org.eclipse.collections.api.stack.primitive.IntStack.collect.

Doc from org.eclipse.collections.api.IntIterable.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
equalsback to summary
public boolean equals(Object otherStack)

Overrides org.eclipse.collections.impl.stack.primitive.AbstractIntStack.equals.

Implements org.eclipse.collections.api.stack.primitive.IntStack.equals.

Doc from org.eclipse.collections.api.stack.primitive.IntStack.equals.

Follows the same general contract as StackIterable#equals(Object).

Annotations
@Override
getDelegateback to summary
protected IntArrayList getDelegate()

Implements abstract org.eclipse.collections.impl.stack.primitive.AbstractIntStack.getDelegate.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides org.eclipse.collections.impl.stack.primitive.AbstractIntStack.hashCode.

Implements org.eclipse.collections.api.stack.primitive.IntStack.hashCode.

Doc from org.eclipse.collections.api.stack.primitive.IntStack.hashCode.

Follows the same general contract as StackIterable#hashCode().

Annotations
@Override
newEmptyback to summary
public IntArrayStack newEmpty()

Overrides default org.eclipse.collections.api.stack.primitive.MutableIntStack.newEmpty.

Creates a new empty IntArrayStack.

Annotations
@Override
Since
9.2.
newStackback to summary
public static IntArrayStack newStack(IntIterable items)
newStackFromTopToBottomback to summary
public static IntArrayStack newStackFromTopToBottom(int... items)
newStackFromTopToBottomback to summary
public static IntArrayStack newStackFromTopToBottom(IntIterable items)
newStackWithback to summary
public static IntArrayStack newStackWith(int... items)
popback to summary
public int pop()

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.pop.

Doc from org.eclipse.collections.api.stack.primitive.MutableIntStack.pop.

Removes and returns the top element of the stack.

Annotations
@Override
popback to summary
public IntList pop(int count)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.pop.

Doc from org.eclipse.collections.api.stack.primitive.MutableIntStack.pop.

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

Annotations
@Override
pushback to summary
public void push(int item)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.push.

Doc from org.eclipse.collections.api.stack.primitive.MutableIntStack.push.

Adds an item to the top of the stack.

Annotations
@Override
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException

Implements java.io.Externalizable.readExternal.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Annotations
@Override
Exceptions
IOException:
if I/O errors occur
rejectback to summary
public MutableIntStack reject(IntPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.reject, org.eclipse.collections.api.stack.primitive.IntStack.reject.

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

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

Annotations
@Override
selectback to summary
public MutableIntStack select(IntPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableIntStack.select, org.eclipse.collections.api.stack.primitive.IntStack.select.

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

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

Annotations
@Override
toImmutableback to summary
public ImmutableIntStack toImmutable()

Implements org.eclipse.collections.api.stack.primitive.IntStack.toImmutable.

Annotations
@Override
toSortedListback to summary
public MutableIntList toSortedList()

Implements org.eclipse.collections.api.IntIterable.toSortedList.

Annotations
@Override
toStackback to summary
public MutableIntStack toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.toStack.

Doc from org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.toStack.

Converts the collection to a IntStack.

Annotations
@Override
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Annotations
@Override
Exceptions
IOException:
Includes any I/O exceptions that may occur