Package ch.hslu.exercises.sw02.ex3
Class ArrayStringStack
java.lang.Object
ch.hslu.exercises.sw02.ex3.ArrayStringStack
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty()Checks if the stack is empty.booleanisFull()Checks if the Stack is full.peek()Take a look the top element without removing it.pop()Take the top element from the stack.voidPushes an element on top of the stack.intsize()Get the size of the Stack.
-
Constructor Details
-
ArrayStringStack
public ArrayStringStack(int size)
-
-
Method Details
-
size
public int size()Description copied from interface:StackGet the size of the Stack. -
peek
Description copied from interface:StackTake a look the top element without removing it. -
pop
Description copied from interface:StackTake the top element from the stack. -
push
Description copied from interface:StackPushes an element on top of the stack. -
isEmpty
public boolean isEmpty()Description copied from interface:StackChecks if the stack is empty. -
isFull
public boolean isFull()Description copied from interface:StackChecks if the Stack is full.
-