Class FloatArrayStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.primitive.AbstractFloatStack
-
- org.eclipse.collections.impl.stack.mutable.primitive.FloatArrayStack
-
- All Implemented Interfaces:
Externalizable,Serializable,FloatIterable,OrderedFloatIterable,PrimitiveIterable,FloatStack,MutableFloatStack
public class FloatArrayStack extends AbstractFloatStack implements MutableFloatStack, Externalizable
FloatArrayStack is similar toArrayStack, and is memory-optimized for float primitives. This file was automatically generated from template file primitiveArrayStack.stg.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FloatArrayStack()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableFloatStackasSynchronized()MutableFloatStackasUnmodifiable()voidclear()<V> MutableStack<V>collect(FloatToObjectFunction<? extends V> function)booleanequals(Object otherStack)inthashCode()FloatArrayStacknewEmpty()Creates a new empty FloatArrayStack.static FloatArrayStacknewStack(FloatIterable items)static FloatArrayStacknewStackFromTopToBottom(float... items)static FloatArrayStacknewStackFromTopToBottom(FloatIterable items)static FloatArrayStacknewStackWith(float... items)floatpop()FloatListpop(int count)voidpush(float item)voidreadExternal(ObjectInput in)MutableFloatStackreject(FloatPredicate predicate)MutableFloatStackselect(FloatPredicate predicate)ImmutableFloatStacktoImmutable()MutableFloatListtoSortedList()voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.stack.primitive.AbstractFloatStack
allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, contains, containsAll, containsAll, count, detectIfNone, each, floatIterator, 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.FloatIterable
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, floatIterator, 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.FloatStack
peek, peek, peekAt
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableFloatStack
collectWithIndex, rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedFloatIterable
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 FloatArrayStack newStackFromTopToBottom(float... items)
-
newStackWith
public static FloatArrayStack newStackWith(float... items)
-
newStack
public static FloatArrayStack newStack(FloatIterable items)
-
newStackFromTopToBottom
public static FloatArrayStack newStackFromTopToBottom(FloatIterable items)
-
push
public void push(float item)
- Specified by:
pushin interfaceMutableFloatStack
-
pop
public float pop()
- Specified by:
popin interfaceMutableFloatStack
-
pop
public FloatList pop(int count)
- Specified by:
popin interfaceMutableFloatStack
-
select
public MutableFloatStack select(FloatPredicate predicate)
- Specified by:
selectin interfaceFloatIterable- Specified by:
selectin interfaceFloatStack- Specified by:
selectin interfaceMutableFloatStack- Specified by:
selectin interfaceOrderedFloatIterable
-
reject
public MutableFloatStack reject(FloatPredicate predicate)
- Specified by:
rejectin interfaceFloatIterable- Specified by:
rejectin interfaceFloatStack- Specified by:
rejectin interfaceMutableFloatStack- Specified by:
rejectin interfaceOrderedFloatIterable
-
collect
public <V> MutableStack<V> collect(FloatToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceFloatIterable- Specified by:
collectin interfaceFloatStack- Specified by:
collectin interfaceMutableFloatStack- Specified by:
collectin interfaceOrderedFloatIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableFloatStack
-
toSortedList
public MutableFloatList toSortedList()
- Specified by:
toSortedListin interfaceFloatIterable
-
asUnmodifiable
public MutableFloatStack asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableFloatStack
-
asSynchronized
public MutableFloatStack asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableFloatStack
-
toImmutable
public ImmutableFloatStack toImmutable()
- Specified by:
toImmutablein interfaceFloatStack
-
newEmpty
public FloatArrayStack newEmpty()
Creates a new empty FloatArrayStack.- Specified by:
newEmptyin interfaceMutableFloatStack- Since:
- 9.2.
-
equals
public boolean equals(Object otherStack)
- Specified by:
equalsin interfaceFloatStack- Overrides:
equalsin classAbstractFloatStack
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceFloatStack- Overrides:
hashCodein classAbstractFloatStack
-
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
-
-