Element - The type of the elements on the stack.public interface Stack<Element>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Stack.StackTop<Element>
The top of a
Stack. |
| Modifier and Type | Method and Description |
|---|---|
Optional<Stack.StackTop<Element>> |
top()
Retrieves the top of this Stack.
|
Optional<Stack.StackTop<Element>> top()
Stack.StackTop will be absent.Optional Stack.StackTop.