public interface Stack<N>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clear the stack
|
boolean |
contains(N n)
Linear search the stack for contains - not an efficient operation
|
boolean |
isEmpty() |
N |
peek()
show the current stack top
|
N |
pop()
pop and return the element from the top of the stack
|
boolean |
push(N n)
Add the element to the stack top, optionally failing if there is
no capacity (overflow)
|
int |
remainingCapacity() |
int |
size() |
boolean contains(N n)
n - - Object to test for containmentboolean push(N n)
n - - element to pushN peek()
N pop()
int size()
int remainingCapacity()
boolean isEmpty()
void clear()
Copyright © 2012–2018 Conversant Engineering. All rights reserved.