Package net.algart.arrays
Interface ObjectStack<E>
- All Superinterfaces:
Stack
- All Known Subinterfaces:
MutableObjectArray<E>
,MutableObjectInPlaceArray<E>
Stack of some objects (non-primitive values).
Any class implementing this interface must contain non-primitive elements.
- Author:
- Daniel Alievsky
-
Method Summary
Modifier and TypeMethodDescriptionpop()
Equivalent toStack.popElement()
.void
Equivalent topushElement(value)
.Methods inherited from interface net.algart.arrays.Stack
clear, length, popElement, pushElement, removeTop
-
Method Details
-
pop
E pop()Equivalent toStack.popElement()
.- Returns:
- the element at the top of this stack (it is removed from the stack by this method).
- Throws:
EmptyStackException
- if this stack is empty.
-
push
Equivalent topushElement(value)
.- Parameters:
value
- to be added to the top of this stack.- Throws:
ArrayStoreException
- if value is notan instance of the class of stack elements.TooLargeArrayException
- if the resulting stack length is too large for this type of stacks.
-