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 to
ArrayStack, and is memory-optimized for float primitives.
This file was automatically generated from template file primitiveArrayStack.stg.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFloatArrayStack(float... items) privateFloatArrayStack(int size) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the Stack<V> MutableStack<V> collect(FloatToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.booleanFollows the same general contract asStackIterable.equals(Object).protected FloatArrayListinthashCode()Follows the same general contract asStackIterable.hashCode().newEmpty()Creates a new empty FloatArrayStack.static FloatArrayStacknewStack(FloatIterable items) static FloatArrayStacknewStackFromTopToBottom(float... items) static FloatArrayStackstatic FloatArrayStacknewStackWith(float... items) floatpop()Removes and returns the top element of the stack.pop(int count) Removes and returns a FloatList of the number of elements specified by the count, beginning with the top of the stack.voidpush(float item) Adds an item to the top of the stack.voidreject(FloatPredicate predicate) Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.select(FloatPredicate predicate) Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.toStack()Converts the collection to a FloatStack.voidMethods inherited from class AbstractFloatStack
allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, checkEmptyStack, checkPositiveValueForCount, checkSizeLessThanCount, 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, rangeCheck, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toStringMethods inherited from interface 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, toSortedListByMethods inherited from interface FloatStack
peek, peek, peekAtMethods inherited from interface MutableFloatStack
collectWithIndex, rejectWithIndex, selectWithIndex, tapMethods inherited from interface OrderedFloatIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, injectIntoWithIndex, rejectWithIndex, selectWithIndexMethods inherited from interface PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
delegate
-
-
Constructor Details
-
FloatArrayStack
public FloatArrayStack() -
FloatArrayStack
private FloatArrayStack(int size) -
FloatArrayStack
private FloatArrayStack(float... items)
-
-
Method Details
-
newStackFromTopToBottom
-
newStackWith
-
newStack
-
newStackFromTopToBottom
-
getDelegate
- Specified by:
getDelegatein classAbstractFloatStack
-
push
public void push(float item) Description copied from interface:MutableFloatStackAdds an item to the top of the stack.- Specified by:
pushin interfaceMutableFloatStack
-
pop
public float pop()Description copied from interface:MutableFloatStackRemoves and returns the top element of the stack.- Specified by:
popin interfaceMutableFloatStack
-
pop
Description copied from interface:MutableFloatStackRemoves and returns a FloatList of the number of elements specified by the count, beginning with the top of the stack.- Specified by:
popin interfaceMutableFloatStack
-
select
Description copied from interface:FloatIterableReturns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.- Specified by:
selectin interfaceFloatIterable- Specified by:
selectin interfaceFloatStack- Specified by:
selectin interfaceMutableFloatStack- Specified by:
selectin interfaceOrderedFloatIterable
-
reject
Description copied from interface:FloatIterableReturns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.- Specified by:
rejectin interfaceFloatIterable- Specified by:
rejectin interfaceFloatStack- Specified by:
rejectin interfaceMutableFloatStack- Specified by:
rejectin interfaceOrderedFloatIterable
-
collect
Description copied from interface:FloatIterableReturns 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.- Specified by:
collectin interfaceFloatIterable- Specified by:
collectin interfaceFloatStack- Specified by:
collectin interfaceMutableFloatStack- Specified by:
collectin interfaceOrderedFloatIterable
-
clear
public void clear()Description copied from interface:MutableFloatStackClears the Stack- Specified by:
clearin interfaceMutableFloatStack
-
toSortedList
- Specified by:
toSortedListin interfaceFloatIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableFloatStack
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableFloatStack
-
toImmutable
- Specified by:
toImmutablein interfaceFloatStack
-
newEmpty
Creates a new empty FloatArrayStack.- Specified by:
newEmptyin interfaceMutableFloatStack- Since:
- 9.2.
-
equals
Description copied from interface:FloatStackFollows the same general contract asStackIterable.equals(Object).- Specified by:
equalsin interfaceFloatStack- Overrides:
equalsin classAbstractFloatStack
-
hashCode
public int hashCode()Description copied from interface:FloatStackFollows the same general contract asStackIterable.hashCode().- Specified by:
hashCodein interfaceFloatStack- Overrides:
hashCodein classAbstractFloatStack
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
toStack
Description copied from interface:OrderedFloatIterableConverts the collection to a FloatStack.- Specified by:
toStackin interfaceOrderedFloatIterable
-