Class LongArrayStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.primitive.AbstractLongStack
-
- org.eclipse.collections.impl.stack.mutable.primitive.LongArrayStack
-
- All Implemented Interfaces:
Externalizable,Serializable,LongIterable,OrderedLongIterable,PrimitiveIterable,LongStack,MutableLongStack
public class LongArrayStack extends AbstractLongStack implements MutableLongStack, Externalizable
LongArrayStack is similar toArrayStack, and is memory-optimized for long primitives. This file was automatically generated from template file primitiveArrayStack.stg.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LongArrayStack()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableLongStackasSynchronized()MutableLongStackasUnmodifiable()voidclear()<V> MutableStack<V>collect(LongToObjectFunction<? extends V> function)booleanequals(Object otherStack)inthashCode()LongArrayStacknewEmpty()Creates a new empty LongArrayStack.static LongArrayStacknewStack(LongIterable items)static LongArrayStacknewStackFromTopToBottom(long... items)static LongArrayStacknewStackFromTopToBottom(LongIterable items)static LongArrayStacknewStackWith(long... items)longpop()LongListpop(int count)voidpush(long item)voidreadExternal(ObjectInput in)MutableLongStackreject(LongPredicate predicate)MutableLongStackselect(LongPredicate predicate)ImmutableLongStacktoImmutable()MutableLongListtoSortedList()voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.stack.primitive.AbstractLongStack
allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, contains, containsAll, containsAll, count, detectIfNone, each, forEachWithIndex, getFirst, indexOf, injectInto, injectIntoWithIndex, longIterator, 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.LongIterable
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, longIterator, 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.LongStack
peek, peek, peekAt
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableLongStack
collectWithIndex, rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedLongIterable
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 LongArrayStack newStackFromTopToBottom(long... items)
-
newStackWith
public static LongArrayStack newStackWith(long... items)
-
newStack
public static LongArrayStack newStack(LongIterable items)
-
newStackFromTopToBottom
public static LongArrayStack newStackFromTopToBottom(LongIterable items)
-
push
public void push(long item)
- Specified by:
pushin interfaceMutableLongStack
-
pop
public long pop()
- Specified by:
popin interfaceMutableLongStack
-
pop
public LongList pop(int count)
- Specified by:
popin interfaceMutableLongStack
-
select
public MutableLongStack select(LongPredicate predicate)
- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceLongStack- Specified by:
selectin interfaceMutableLongStack- Specified by:
selectin interfaceOrderedLongIterable
-
reject
public MutableLongStack reject(LongPredicate predicate)
- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceLongStack- Specified by:
rejectin interfaceMutableLongStack- Specified by:
rejectin interfaceOrderedLongIterable
-
collect
public <V> MutableStack<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceLongStack- Specified by:
collectin interfaceMutableLongStack- Specified by:
collectin interfaceOrderedLongIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableLongStack
-
toSortedList
public MutableLongList toSortedList()
- Specified by:
toSortedListin interfaceLongIterable
-
asUnmodifiable
public MutableLongStack asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableLongStack
-
asSynchronized
public MutableLongStack asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableLongStack
-
toImmutable
public ImmutableLongStack toImmutable()
- Specified by:
toImmutablein interfaceLongStack
-
newEmpty
public LongArrayStack newEmpty()
Creates a new empty LongArrayStack.- Specified by:
newEmptyin interfaceMutableLongStack- Since:
- 9.2.
-
equals
public boolean equals(Object otherStack)
- Specified by:
equalsin interfaceLongStack- Overrides:
equalsin classAbstractLongStack
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceLongStack- Overrides:
hashCodein classAbstractLongStack
-
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
-
-