public interface LongStack
Stack that reduces (un)boxing| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the stack
|
default boolean |
isEmpty() |
long |
peek(int index)
Provides the Selected Object from the stack.
|
long |
pop()
Removes the Object on top of the stack.
|
void |
push(long e)
Inserts a given Object on top of the stack
|
int |
size()
Provides the amount of elements currently in the stack
|
default long |
top()
Provides the Object on top of the stack
|
void push(long e)
e - the Object to insertStack.push(Object)long pop()
java.lang.ArrayIndexOutOfBoundsException - if the stack is emptyStack.pop()default long top()
java.lang.ArrayIndexOutOfBoundsException - if the stack is emptyStack.top()long 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()