Class DoubleArrayStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.primitive.AbstractDoubleStack
-
- org.eclipse.collections.impl.stack.mutable.primitive.DoubleArrayStack
-
- All Implemented Interfaces:
Externalizable
,Serializable
,DoubleIterable
,OrderedDoubleIterable
,PrimitiveIterable
,DoubleStack
,MutableDoubleStack
public class DoubleArrayStack extends AbstractDoubleStack implements MutableDoubleStack, Externalizable
DoubleArrayStack is similar toArrayStack
, and is memory-optimized for double primitives. This file was automatically generated from template file primitiveArrayStack.stg.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DoubleArrayStack()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableDoubleStack
asSynchronized()
MutableDoubleStack
asUnmodifiable()
void
clear()
<V> MutableStack<V>
collect(DoubleToObjectFunction<? extends V> function)
boolean
equals(Object otherStack)
int
hashCode()
DoubleArrayStack
newEmpty()
Creates a new empty DoubleArrayStack.static DoubleArrayStack
newStack(DoubleIterable items)
static DoubleArrayStack
newStackFromTopToBottom(double... items)
static DoubleArrayStack
newStackFromTopToBottom(DoubleIterable items)
static DoubleArrayStack
newStackWith(double... items)
double
pop()
DoubleList
pop(int count)
void
push(double item)
void
readExternal(ObjectInput in)
MutableDoubleStack
reject(DoublePredicate predicate)
MutableDoubleStack
select(DoublePredicate predicate)
ImmutableDoubleStack
toImmutable()
MutableDoubleList
toSortedList()
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.eclipse.collections.impl.stack.primitive.AbstractDoubleStack
allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, contains, containsAll, containsAll, count, detectIfNone, doubleIterator, each, forEachWithIndex, getFirst, indexOf, injectInto, injectIntoWithIndex, 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.DoubleIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, doubleIterator, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, 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.DoubleStack
peek, peek, peekAt
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableDoubleStack
collectWithIndex, rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedDoubleIterable
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 DoubleArrayStack newStackFromTopToBottom(double... items)
-
newStackWith
public static DoubleArrayStack newStackWith(double... items)
-
newStack
public static DoubleArrayStack newStack(DoubleIterable items)
-
newStackFromTopToBottom
public static DoubleArrayStack newStackFromTopToBottom(DoubleIterable items)
-
push
public void push(double item)
- Specified by:
push
in interfaceMutableDoubleStack
-
pop
public double pop()
- Specified by:
pop
in interfaceMutableDoubleStack
-
pop
public DoubleList pop(int count)
- Specified by:
pop
in interfaceMutableDoubleStack
-
select
public MutableDoubleStack select(DoublePredicate predicate)
- Specified by:
select
in interfaceDoubleIterable
- Specified by:
select
in interfaceDoubleStack
- Specified by:
select
in interfaceMutableDoubleStack
- Specified by:
select
in interfaceOrderedDoubleIterable
-
reject
public MutableDoubleStack reject(DoublePredicate predicate)
- Specified by:
reject
in interfaceDoubleIterable
- Specified by:
reject
in interfaceDoubleStack
- Specified by:
reject
in interfaceMutableDoubleStack
- Specified by:
reject
in interfaceOrderedDoubleIterable
-
collect
public <V> MutableStack<V> collect(DoubleToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceDoubleIterable
- Specified by:
collect
in interfaceDoubleStack
- Specified by:
collect
in interfaceMutableDoubleStack
- Specified by:
collect
in interfaceOrderedDoubleIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableDoubleStack
-
toSortedList
public MutableDoubleList toSortedList()
- Specified by:
toSortedList
in interfaceDoubleIterable
-
asUnmodifiable
public MutableDoubleStack asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableDoubleStack
-
asSynchronized
public MutableDoubleStack asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableDoubleStack
-
toImmutable
public ImmutableDoubleStack toImmutable()
- Specified by:
toImmutable
in interfaceDoubleStack
-
newEmpty
public DoubleArrayStack newEmpty()
Creates a new empty DoubleArrayStack.- Specified by:
newEmpty
in interfaceMutableDoubleStack
- Since:
- 9.2.
-
equals
public boolean equals(Object otherStack)
- Specified by:
equals
in interfaceDoubleStack
- Overrides:
equals
in classAbstractDoubleStack
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceDoubleStack
- Overrides:
hashCode
in classAbstractDoubleStack
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
-
-