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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceStack.StackTop<Element>The top of aStack.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<Stack.StackTop<Element>>top()Retrieves the top of this Stack.
-
-
-
Method Detail
-
top
Optional<Stack.StackTop<Element>> top()
Retrieves the top of this Stack. If the stack is empty theStack.StackTopwill be absent.
-
-