package stack;

/**
 * Stack interface
 * @author Winston Prakash
 */
public interface Stack<E> {
    /**
     * Tests if this stack is empty.
     */
    public boolean empty();
    /**
     * Looks at the object at the top of this stack without removing it from the stack.
     */
    public E peek();
    /**
     * Pushes an item onto the top of this stack.
     */
    public void push(E item);
    /**
     * Pushes an item onto the top of this stack.
     */
    public E pop();
    /**
     * Returns the 1-based position where an object is on this stack.
     */
    public int search(E item);
}