| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Protocol for stacks.
| Method Summary | |
 boolean | 
isEmpty()
Test if the stack is logically empty.  | 
 void | 
makeEmpty()
Make the stack logically empty.  | 
 void | 
pop()
Remove the most recently inserted item from the stack.  | 
 void | 
push(java.lang.Object x)
Insert a new item into the stack.  | 
 java.lang.Object | 
top()
Get the most recently inserted item in the stack.  | 
 java.lang.Object | 
topAndPop()
Return and remove the most recently inserted item from the stack.  | 
| Method Detail | 
public void push(java.lang.Object x)
x - the item to insert.public void pop()
UnderflowException - if the stack is empty.public java.lang.Object top()
UnderflowException - if the stack is empty.public java.lang.Object topAndPop()
UnderflowException - if the stack is empty.public boolean isEmpty()
public void makeEmpty()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||