|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Stack<T>
Minimal interface for a LIFO Stack, hiding implementation details.
Method Summary | |
---|---|
void |
clear()
Clears the whole stack. |
boolean |
isEmpty()
Checks whether the stack is empty. |
T |
peek()
Get the object from the top of the stack. |
T |
pop()
Pop the object from the top of the stack. |
void |
push(T o)
Push an object to the top of the stack. |
Method Detail |
---|
void push(T o)
o
- object to push on topT pop() throws java.util.EmptyStackException
java.util.EmptyStackException
- if the stack is emptyT peek() throws java.util.EmptyStackException
java.util.EmptyStackException
- if the stack is emptyboolean isEmpty()
true
if the stack is emptyvoid clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |