Package org.dmfs.jems2
Interface Stack<Element>
- All Known Implementing Classes:
EmptyStack,SingleStack,Topped
public interface Stack<Element>
An immutable stack. By design elements can only be retrieved from the top.
-
Method Details
-
top
Optional<Stack.StackTop<Element>> top()Retrieves the top of this Stack. If the stack is empty theStack.StackTopwill be absent.
-