public interface CharStack
Stack that reduces (un)boxing| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the stack
|
default boolean |
isEmpty() |
char |
peek(int index)
Provides the Selected Object from the stack.
|
char |
pop()
Removes the Object on top of the stack.
|
void |
push(char e)
Inserts a given Object on top of the stack
|
int |
size()
Provides the amount of elements currently in the stack
|
default char |
top()
Provides the Object on top of the stack
|
void push(char e)
e - the Object to insertStack.push(Object)char pop()
java.lang.ArrayIndexOutOfBoundsException - if the stack is emptyStack.pop()default char top()
java.lang.ArrayIndexOutOfBoundsException - if the stack is emptyStack.top()char peek(int index)
index - of the element that should be providedjava.lang.ArrayIndexOutOfBoundsException - if the index is out of boundsStack.peek(int)void clear()
int size()
default boolean isEmpty()