Created
June 19, 2015 10:36
-
-
Save AnimeshShaw/9268cd763e80df9bd6e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.codehackersblog.stack; | |
| /** | |
| * | |
| * @author PsychoCoder | |
| */ | |
| public interface StackInterface { | |
| /** | |
| * | |
| * @param item Inserts an element into the stack. | |
| */ | |
| public abstract void push(int item); | |
| /** | |
| * | |
| * @return Returns the element removed from the stack | |
| */ | |
| public abstract int pop(); | |
| /**' | |
| * | |
| * @return Returns true is the stack is empty | |
| */ | |
| public abstract boolean isEmpty(); | |
| /** | |
| * | |
| * @return Returns true if the stack is full | |
| */ | |
| public abstract boolean isFull(); | |
| /** | |
| * | |
| * @return Returns the top element of the array | |
| */ | |
| public abstract int peek(); | |
| /** | |
| * | |
| * @return Returns the size of the array | |
| */ | |
| public abstract int size(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment