E - type of stack entries@ThreadSafe
public interface Stack<E>
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmpty()
Check if stack is empty.
|
E |
peek()
Returns the top element of stack w/o remove it.
|
E |
pop()
Returns the top element of stack and removes it.
|
void |
push(E element)
Push entry on top of the stack.
|
boolean isEmpty()
true if empty; else falseE peek()
null if stack is emptyE pop()
null if stack is emptyvoid push(E element)
element - pushed entryCopyright © 2014 Sven Strittmatter. All Rights Reserved.