Package it.unimi.dsi.fastutil.shorts
Interface ShortStack
- All Superinterfaces:
it.unimi.dsi.fastutil.Stack<java.lang.Short>
- All Known Implementing Classes:
AbstractShortBigList,AbstractShortBigList.ShortRandomAccessSubList,AbstractShortBigList.ShortSubList,AbstractShortList,AbstractShortList.ShortRandomAccessSubList,AbstractShortList.ShortSubList,AbstractShortStack,ShortArrayList,ShortBigArrayBigList,ShortBigLists.ListBigList,ShortBigLists.Singleton,ShortImmutableList,ShortLists.Singleton
public interface ShortStack
extends it.unimi.dsi.fastutil.Stack<java.lang.Short>
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.Shortpeek(int i)Deprecated.Please use the corresponding type-specific method instead.shortpeekShort(int i)Peeks at an element on the stack (optional operation).default java.lang.Shortpop()Deprecated.Please use the corresponding type-specific method instead.shortpopShort()Pops the top off the stack.voidpush(short k)Pushes the given object on the stack.default voidpush(java.lang.Short o)Deprecated.Please use the corresponding type-specific method instead.default java.lang.Shorttop()Deprecated.Please use the corresponding type-specific method instead.shorttopShort()Peeks at the top of the stack (optional operation).Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
-
Method Details
-
push
void push(short k)Pushes the given object on the stack.- Parameters:
k- the object to push on the stack.- See Also:
Stack.push(Object)
-
popShort
short popShort()Pops the top off the stack.- Returns:
- the top of the stack.
- See Also:
Stack.pop()
-
topShort
short topShort()Peeks at the top of the stack (optional operation).- Returns:
- the top of the stack.
- See Also:
Stack.top()
-
peekShort
short peekShort(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.Short o)Deprecated.Please use the corresponding type-specific method instead.This default implementation delegates to the corresponding type-specific method.
- Specified by:
pushin interfaceit.unimi.dsi.fastutil.Stack<java.lang.Short>
-
pop
@Deprecated default java.lang.Short pop()Deprecated.Please use the corresponding type-specific method instead.This default implementation delegates to the corresponding type-specific method.
- Specified by:
popin interfaceit.unimi.dsi.fastutil.Stack<java.lang.Short>
-
top
@Deprecated default java.lang.Short top()Deprecated.Please use the corresponding type-specific method instead.This default implementation delegates to the corresponding type-specific method.
- Specified by:
topin interfaceit.unimi.dsi.fastutil.Stack<java.lang.Short>
-
peek
@Deprecated default java.lang.Short peek(int i)Deprecated.Please use the corresponding type-specific method instead.This default implementation delegates to the corresponding type-specific method.
- Specified by:
peekin interfaceit.unimi.dsi.fastutil.Stack<java.lang.Short>
-