|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Stack<E>
A simple last-in-first-out (LIFO) stack, to a better OO design than Sun's one: it only exposes the behaviour that a stack should have.
| Method Summary | |
|---|---|
boolean |
isEmpty()
|
E |
peek()
Look at last value without removing it. |
E |
pop()
Get the last value, removing it from the stack. |
void |
push(E obj)
Put a new last value onto the stack. |
| Method Detail |
|---|
boolean isEmpty()
E peek()
E pop()
void push(E obj)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||