/**
   The Stack interface specifies a collection of elements that are added
   and removed according to the last-in-first-out principle.

   @author      Franck van Breugel
   @version	1.3    January 4, 2003
*/
public interface Stack 
{
    /** 
	Returns the size of this stack. 

	@return The size of this stack.
    */
    public int size();

    /** 
	Tests if this stack is empty. 
     
	@return true if this stack is empty, false otherwise.
    */
    public boolean isEmpty();

    /** 
	Returns the element at the top of this stack.

	@return The element at the top of this stack.
	@exception StackEmptyException if this stack is empty. 
     */
    public Object top() throws StackEmptyException;

    /** 
	Adds the specified element onto the top of this stack. 
     
	@param element the element to be added to this stack.
    **/
    public void push(Object element);

    /** 
	Removes the element at the top of this stack and returns that element.

	@return The element at the top of this stack.
	@exception StackEmptyException if this stack is empty. 
    */
    public Object pop() throws StackEmptyException;
}



