Top Description Fields Constructors Methods
org.eclipse.collections.impl.stack.mutable.primitive

public Class FloatArrayStack

extends AbstractFloatStack
implements MutableFloatStack, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.stack.primitive.MutableFloatStack, org.eclipse.collections.api.stack.primitive.FloatStack, org.eclipse.collections.api.ordered.primitive.OrderedFloatIterable, org.eclipse.collections.api.FloatIterable, org.eclipse.collections.api.PrimitiveIterable
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, org.eclipse.collections.api.FloatIterable, org.eclipse.collections.api.block.function.primitive.FloatToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.FloatPredicate, org.eclipse.collections.api.iterator.FloatIterator, org.eclipse.collections.api.list.primitive.FloatList, .MutableFloatList, org.eclipse.collections.api.stack.MutableStack, org.eclipse.collections.api.stack.primitive.FloatStack, .ImmutableFloatStack, .MutableFloatStack, org.eclipse.collections.impl.factory.primitive.FloatStacks, org.eclipse.collections.impl.list.mutable.primitive.FloatArrayList, org.eclipse.collections.impl.stack.primitive.AbstractFloatStack, org.eclipse.collections.impl.stack.mutable.ArrayStack

FloatArrayStack is similar to ArrayStack, and is memory-optimized for float primitives. This file was automatically generated from template file primitiveArrayStack.stg.

Field Summary

Modifier and TypeField and Description
private transient FloatArrayList
private static final long

Constructor Summary

AccessConstructor and Description
public
private
FloatArrayStack(int size)

private
FloatArrayStack(float... items)

Method Summary

Modifier and TypeMethod and Description
public MutableFloatStack
public MutableFloatStack
public void
public <V> MutableStack<V>
collect(FloatToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.collect, org.eclipse.collections.api.stack.primitive.FloatStack.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public boolean
protected FloatArrayList
public int
public FloatArrayStack
newEmpty()

Overrides default org.eclipse.collections.api.stack.primitive.MutableFloatStack.newEmpty.

Creates a new empty FloatArrayStack.

public static FloatArrayStack
public static FloatArrayStack
newStackFromTopToBottom(float... items)

public static FloatArrayStack
public static FloatArrayStack
newStackWith(float... items)

public float
pop()

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.pop.

Removes and returns the top element of the stack.

public FloatList
pop(int count)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.pop.

Removes and returns a FloatList of the number of elements specified by the count, beginning with the top of the stack.

public void
push(float item)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.push.

Adds an item to the top of the stack.

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

public MutableFloatStack
reject(FloatPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.reject, org.eclipse.collections.api.stack.primitive.FloatStack.reject.

Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.

public MutableFloatStack
select(FloatPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.select, org.eclipse.collections.api.stack.primitive.FloatStack.select.

Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.

public ImmutableFloatStack
public MutableFloatList
public MutableFloatStack
toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedFloatIterable.toStack.

Converts the collection to a FloatStack.

public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.eclipse.collections.impl.stack.primitive.AbstractFloatStack:
allSatisfyanySatisfyappendStringappendStringappendStringasLazyaveragecheckEmptyStackcheckPositiveValueForCountcheckSizeLessThanCountchunkcontainscontainsAllcontainsAllcountdetectIfNoneeachfloatIteratorforEachWithIndexgetFirstindexOfinjectIntoinjectIntoWithIndexmakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfypeekpeekpeekAtrangeChecksizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoString

Field Detail

delegateback to summary
private transient FloatArrayList delegate
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

FloatArrayStackback to summary
public FloatArrayStack()
FloatArrayStackback to summary
private FloatArrayStack(int size)
FloatArrayStackback to summary
private FloatArrayStack(float... items)

Method Detail

asSynchronizedback to summary
public MutableFloatStack asSynchronized()

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableFloatStack asUnmodifiable()

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.asUnmodifiable.

Annotations
@Override
clearback to summary
public void clear()

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.clear.

Doc from org.eclipse.collections.api.stack.primitive.MutableFloatStack.clear.

Clears the Stack

Annotations
@Override
collectback to summary
public <V> MutableStack<V> collect(FloatToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.collect, org.eclipse.collections.api.stack.primitive.FloatStack.collect.

Doc from org.eclipse.collections.api.FloatIterable.collect.

Returns 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.

Annotations
@Override
equalsback to summary
public boolean equals(Object otherStack)

Overrides org.eclipse.collections.impl.stack.primitive.AbstractFloatStack.equals.

Implements org.eclipse.collections.api.stack.primitive.FloatStack.equals.

Doc from org.eclipse.collections.api.stack.primitive.FloatStack.equals.

Follows the same general contract as StackIterable#equals(Object).

Annotations
@Override
getDelegateback to summary
protected FloatArrayList getDelegate()

Implements abstract org.eclipse.collections.impl.stack.primitive.AbstractFloatStack.getDelegate.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides org.eclipse.collections.impl.stack.primitive.AbstractFloatStack.hashCode.

Implements org.eclipse.collections.api.stack.primitive.FloatStack.hashCode.

Doc from org.eclipse.collections.api.stack.primitive.FloatStack.hashCode.

Follows the same general contract as StackIterable#hashCode().

Annotations
@Override
newEmptyback to summary
public FloatArrayStack newEmpty()

Overrides default org.eclipse.collections.api.stack.primitive.MutableFloatStack.newEmpty.

Creates a new empty FloatArrayStack.

Annotations
@Override
Since
9.2.
newStackback to summary
public static FloatArrayStack newStack(FloatIterable items)
newStackFromTopToBottomback to summary
public static FloatArrayStack newStackFromTopToBottom(float... items)
newStackFromTopToBottomback to summary
public static FloatArrayStack newStackFromTopToBottom(FloatIterable items)
newStackWithback to summary
public static FloatArrayStack newStackWith(float... items)
popback to summary
public float pop()

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.pop.

Doc from org.eclipse.collections.api.stack.primitive.MutableFloatStack.pop.

Removes and returns the top element of the stack.

Annotations
@Override
popback to summary
public FloatList pop(int count)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.pop.

Doc from org.eclipse.collections.api.stack.primitive.MutableFloatStack.pop.

Removes and returns a FloatList of the number of elements specified by the count, beginning with the top of the stack.

Annotations
@Override
pushback to summary
public void push(float item)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.push.

Doc from org.eclipse.collections.api.stack.primitive.MutableFloatStack.push.

Adds an item to the top of the stack.

Annotations
@Override
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException

Implements java.io.Externalizable.readExternal.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Annotations
@Override
Exceptions
IOException:
if I/O errors occur
rejectback to summary
public MutableFloatStack reject(FloatPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.reject, org.eclipse.collections.api.stack.primitive.FloatStack.reject.

Doc from org.eclipse.collections.api.FloatIterable.reject.

Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.

Annotations
@Override
selectback to summary
public MutableFloatStack select(FloatPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableFloatStack.select, org.eclipse.collections.api.stack.primitive.FloatStack.select.

Doc from org.eclipse.collections.api.FloatIterable.select.

Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.

Annotations
@Override
toImmutableback to summary
public ImmutableFloatStack toImmutable()

Implements org.eclipse.collections.api.stack.primitive.FloatStack.toImmutable.

Annotations
@Override
toSortedListback to summary
public MutableFloatList toSortedList()

Implements org.eclipse.collections.api.FloatIterable.toSortedList.

Annotations
@Override
toStackback to summary
public MutableFloatStack toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedFloatIterable.toStack.

Doc from org.eclipse.collections.api.ordered.primitive.OrderedFloatIterable.toStack.

Converts the collection to a FloatStack.

Annotations
@Override
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Annotations
@Override
Exceptions
IOException:
Includes any I/O exceptions that may occur