DAT
Interface StackChar


public interface StackChar

Character stack interface.


Method Summary
 boolean isEmpty()
          test whether the stack is empty
 char peek()
          examine the top item of the stack
 char pop()
          pop the top item off the stack
 void push(char a)
          push a new item onto the stack
 

Method Detail

isEmpty

boolean isEmpty()
test whether the stack is empty

Returns:
true if the stack is empty, false otherwise

push

void push(char a)
          throws Overflow
push a new item onto the stack

Parameters:
a - the item to push
Throws:
Overflow - if stack is full

peek

char peek()
          throws Underflow
examine the top item of the stack

Returns:
the top item in the stack
Throws:
Underflow - if the stack is empty

pop

char pop()
         throws Underflow
pop the top item off the stack

Returns:
the top item
Throws:
Underflow - if stack is empty