package towerofhanoi; // Virginia Tech Honor Code Pledge: // // As a Hokie, I will conduct myself with honor and integrity at all times. // I will not lie, cheat, or steal, nor will I accept the actions of those who // do. // -- Jordan Harrington (jordanha23) /** * @author Jordan Harrington * @version <3/25/2020> * @param <T> * - Type T * */ public interface StackInterface<T> { /** * Checks if the stack is empty. * * @return Returns true if the stack is empty. */ public boolean isEmpty(); /** * Checks the disk at the top of the * stack without removing it. * * @return disk at the top of the stack. */ public T peek(); /** * Removes the disk at the top of * the stack. * * @return The disk that was removed. */ public T pop(); /** * Pushes an object onto the stack. * * @param disk * - disk to be pushed * onto the stack. */ public void push(T disk); /** * Clears the stack (removes all of * the disks from the stack). */ public void clear(); }