Interface StackImpl

All Known Implementing Classes:
FixedStack, UnboundedStack

public interface StackImpl

Interface implemented by all stacks.


Method Summary
 int pop()
          Pop the stack.
 void push(int val)
          Push an integer onto the stack.
 int size()
          Return the number of elements contained in the stack.
 

Method Detail

push

public void push(int val)
Push an integer onto the stack.
Parameters:
val - The integer value pushed onto the stack.

pop

public int pop()
Pop the stack.
Returns:
The integer value popped from the stack.

size

public int size()
Return the number of elements contained in the stack.
Returns:
The number of elements contained in the stack.