Interface IStack

All Known Implementing Classes:
VectorStackSolution

public interface IStack

Required methods for the Stack ADT.


Method Summary
 boolean isEmpty()
          Returns whether or not this is empty.
 Object pop()
          Removes and returns the top object on this.
 void push(Object anObject)
          Pushes the given object onto this.
 int size()
          Returns the number of objects on this.
 Object top()
          Returns the top object on this.
 

Method Detail

push

public void push(Object anObject)
Pushes the given object onto this.

Parameters:
anObject - object to push

pop

public Object pop()
Removes and returns the top object on this.


top

public Object top()
Returns the top object on this.


size

public int size()
Returns the number of objects on this.


isEmpty

public boolean isEmpty()
Returns whether or not this is empty.