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