asd_library.stack
Interface Stack_adt

All Known Implementing Classes:
Stack

public interface Stack_adt

The abstract data type stack.


Method Summary
 boolean isEmpty()
          Verifies if the stack is empty.
 java.lang.Object pop()
          Retrieves an item and deletes it from the stack.
 void push(java.lang.Object el)
          Stores an item on the stack.
 java.lang.Object top()
          Retrieves the item from the stack head but doesn't remove it.
 

Method Detail

push

public void push(java.lang.Object el)
Stores an item on the stack.

Parameters:
el - the object to store.

pop

public java.lang.Object pop()
Retrieves an item and deletes it from the stack.

Returns:
the object deleted from the stack.

top

public java.lang.Object top()
Retrieves the item from the stack head but doesn't remove it.

Returns:
the object on the top of the stack.

isEmpty

public boolean isEmpty()
Verifies if the stack is empty.

Returns:
true if the stack is empty, false otherwise.