| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--weiss.nonstandard.ListStack
List-based implementation of the stack.
| Constructor Summary | |
ListStack()
Construct the stack.  | 
|
| 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.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public ListStack()
| Method Detail | 
public boolean isEmpty()
isEmpty in interface Stackpublic void makeEmpty()
makeEmpty in interface Stackpublic void push(java.lang.Object x)
push in interface Stackx - the item to insert.public void pop()
pop in interface StackUnderflowException - if the stack is empty.public java.lang.Object top()
top in interface StackUnderflowException - if the stack is empty.public java.lang.Object topAndPop()
topAndPop in interface StackUnderflowException - if the stack is empty.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||