com.mhhe.clrs2e
Interface Stack

All Known Implementing Classes:
StackArray

public interface Stack

Interface for a stack.


Method Summary
 boolean isEmpty()
          Returns true if the stack is empty, false otherwise.
 java.lang.Object pop()
          Pops an object from the stack, returning the popped object.
 void push(java.lang.Object x)
          Pushes an object onto the stack.
 

Method Detail

push

public void push(java.lang.Object x)
Pushes an object onto the stack.

Parameters:
x - Object to be pushed.

pop

public java.lang.Object pop()
Pops an object from the stack, returning the popped object.


isEmpty

public boolean isEmpty()
Returns true if the stack is empty, false otherwise.