Package it.unimi.dsi.fastutil.longs
Interface LongStack
- All Superinterfaces:
it.unimi.dsi.fastutil.Stack<Long>
- All Known Implementing Classes:
AbstractLongList,AbstractLongList.LongRandomAccessSubList,AbstractLongList.LongSubList,LongArrayList,LongArrayList.SubList,LongImmutableList,LongLists.Singleton
A type-specific
Stack; provides some additional methods that use polymorphism to avoid (un)boxing.-
Method Summary
Modifier and TypeMethodDescriptiondefault Longpeek(int i) Deprecated.Please use the corresponding type-specific method instead.longpeekLong(int i) Peeks at an element on the stack (optional operation).default Longpop()Deprecated.Please use the corresponding type-specific method instead.longpopLong()Pops the top off the stack.voidpush(long k) Pushes the given object on the stack.default voidDeprecated.Please use the corresponding type-specific method instead.default Longtop()Deprecated.Please use the corresponding type-specific method instead.longtopLong()Peeks at the top of the stack (optional operation).Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
-
Method Details
-
push
void push(long k) Pushes the given object on the stack.- Parameters:
k- the object to push on the stack.- See Also:
-
popLong
long popLong()Pops the top off the stack.- Returns:
- the top of the stack.
- See Also:
-
topLong
long topLong()Peeks at the top of the stack (optional operation).- Returns:
- the top of the stack.
- See Also:
-
peekLong
long peekLong(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:
-
push
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<Long>
-
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<Long>
-
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<Long>
-
peek
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<Long>
-