Class IntArrayStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.primitive.AbstractIntStack
-
- org.eclipse.collections.impl.stack.mutable.primitive.IntArrayStack
-
- All Implemented Interfaces:
Externalizable,Serializable,IntIterable,OrderedIntIterable,PrimitiveIterable,IntStack,MutableIntStack
public class IntArrayStack extends AbstractIntStack implements MutableIntStack, Externalizable
IntArrayStack is similar toArrayStack, and is memory-optimized for int primitives. This file was automatically generated from template file primitiveArrayStack.stg.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntArrayStack()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableIntStackasSynchronized()MutableIntStackasUnmodifiable()voidclear()<V> MutableStack<V>collect(IntToObjectFunction<? extends V> function)booleanequals(Object otherStack)inthashCode()IntArrayStacknewEmpty()Creates a new empty IntArrayStack.static IntArrayStacknewStack(IntIterable items)static IntArrayStacknewStackFromTopToBottom(int... items)static IntArrayStacknewStackFromTopToBottom(IntIterable items)static IntArrayStacknewStackWith(int... items)intpop()IntListpop(int count)voidpush(int item)voidreadExternal(ObjectInput in)MutableIntStackreject(IntPredicate predicate)MutableIntStackselect(IntPredicate predicate)ImmutableIntStacktoImmutable()MutableIntListtoSortedList()voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.stack.primitive.AbstractIntStack
allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, contains, containsAll, containsAll, count, detectIfNone, each, forEachWithIndex, getFirst, indexOf, injectInto, injectIntoWithIndex, intIterator, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, peek, peek, peekAt, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toString
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, intIterator, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.IntStack
peek, peek, peekAt
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableIntStack
collectWithIndex, rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, injectIntoWithIndex, rejectWithIndex, selectWithIndex
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Method Detail
-
newStackFromTopToBottom
public static IntArrayStack newStackFromTopToBottom(int... items)
-
newStackWith
public static IntArrayStack newStackWith(int... items)
-
newStack
public static IntArrayStack newStack(IntIterable items)
-
newStackFromTopToBottom
public static IntArrayStack newStackFromTopToBottom(IntIterable items)
-
push
public void push(int item)
- Specified by:
pushin interfaceMutableIntStack
-
pop
public int pop()
- Specified by:
popin interfaceMutableIntStack
-
pop
public IntList pop(int count)
- Specified by:
popin interfaceMutableIntStack
-
select
public MutableIntStack select(IntPredicate predicate)
- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceIntStack- Specified by:
selectin interfaceMutableIntStack- Specified by:
selectin interfaceOrderedIntIterable
-
reject
public MutableIntStack reject(IntPredicate predicate)
- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceIntStack- Specified by:
rejectin interfaceMutableIntStack- Specified by:
rejectin interfaceOrderedIntIterable
-
collect
public <V> MutableStack<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceIntStack- Specified by:
collectin interfaceMutableIntStack- Specified by:
collectin interfaceOrderedIntIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableIntStack
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedListin interfaceIntIterable
-
asUnmodifiable
public MutableIntStack asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableIntStack
-
asSynchronized
public MutableIntStack asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableIntStack
-
toImmutable
public ImmutableIntStack toImmutable()
- Specified by:
toImmutablein interfaceIntStack
-
newEmpty
public IntArrayStack newEmpty()
Creates a new empty IntArrayStack.- Specified by:
newEmptyin interfaceMutableIntStack- Since:
- 9.2.
-
equals
public boolean equals(Object otherStack)
- Specified by:
equalsin interfaceIntStack- Overrides:
equalsin classAbstractIntStack
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceIntStack- Overrides:
hashCodein classAbstractIntStack
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
-