Created
June 13, 2015 15:53
-
-
Save AnimeshShaw/41d5565979bc51ff191f to your computer and use it in GitHub Desktop.
JStack Interface
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.JStack; | |
| /** | |
| * | |
| * @author Psycho_Coder | |
| * @param <T> | |
| */ | |
| public interface StackInterface<T> { | |
| /** | |
| * | |
| * @param item This method push the item passed into the stack | |
| */ | |
| public abstract void push(T item); | |
| /** | |
| * | |
| * @return This method removes the top element from the stack | |
| */ | |
| public abstract T pop(); | |
| /** | |
| * | |
| * @return This method returns whether the stack is empty or not | |
| */ | |
| public abstract boolean isEmpty(); | |
| /** | |
| * | |
| * @return This Methods returns the top element of the stack | |
| */ | |
| public abstract T peek(); | |
| /** | |
| * | |
| * @return This method returns the size of the stack | |
| */ | |
| public abstract int size(); | |
| /** | |
| * | |
| * @return This method returns the array of the items in the stack | |
| */ | |
| public abstract String display(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment