Package it.unimi.dsi.fastutil.floats
Interface FloatStack
- All Superinterfaces:
Stack<java.lang.Float>
- All Known Implementing Classes:
AbstractFloatBigList,AbstractFloatBigList.FloatRandomAccessSubList,AbstractFloatBigList.FloatSubList,AbstractFloatList,AbstractFloatList.FloatRandomAccessSubList,AbstractFloatList.FloatSubList,AbstractFloatStack,FloatArrayList,FloatBigArrayBigList,FloatBigLists.ListBigList,FloatBigLists.Singleton,FloatImmutableList,FloatLists.Singleton
public interface FloatStack extends Stack<java.lang.Float>
A type-specific
Stack; provides some additional methods that use
polymorphism to avoid (un)boxing.-
Method Summary
Modifier and Type Method Description default java.lang.Floatpeek(int i)Deprecated.Please use the corresponding type-specific method instead.floatpeekFloat(int i)Peeks at an element on the stack (optional operation).default java.lang.Floatpop()Deprecated.Please use the corresponding type-specific method instead.floatpopFloat()Pops the top off the stack.voidpush(float k)Pushes the given object on the stack.default voidpush(java.lang.Float o)Deprecated.Please use the corresponding type-specific method instead.default java.lang.Floattop()Deprecated.Please use the corresponding type-specific method instead.floattopFloat()Peeks at the top of the stack (optional operation).
-
Method Details
-
push
void push(float k)Pushes the given object on the stack.- Parameters:
k- the object to push on the stack.- See Also:
Stack.push(Object)
-
popFloat
float popFloat()Pops the top off the stack.- Returns:
- the top of the stack.
- See Also:
Stack.pop()
-
topFloat
float topFloat()Peeks at the top of the stack (optional operation).- Returns:
- the top of the stack.
- See Also:
Stack.top()
-
peekFloat
float peekFloat(int i)Peeks at an element on the stack (optional operation).- Parameters:
i- an index from the stop of the stack (0 represents the top).- Returns:
- the
i-th element on the stack. - See Also:
Stack.peek(int)
-
push
@Deprecated default void push(java.lang.Float o)Deprecated.Please use the corresponding type-specific method instead.Pushes the given object on the stack.This default implementation delegates to the corresponding type-specific method.
-
pop
@Deprecated default java.lang.Float pop()Deprecated.Please use the corresponding type-specific method instead.Pops the top off the stack.This default implementation delegates to the corresponding type-specific method.
-
top
@Deprecated default java.lang.Float top()Deprecated.Please use the corresponding type-specific method instead.Peeks at the top of the stack (optional operation).This default implementation returns
peek(0).This default implementation delegates to the corresponding type-specific method.
-
peek
@Deprecated default java.lang.Float peek(int i)Deprecated.Please use the corresponding type-specific method instead.Peeks at an element on the stack (optional operation).This default implementation just throws an
UnsupportedOperationException.This default implementation delegates to the corresponding type-specific method.
-