|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.hiveutils.collections.impl.StackImpl<T>
public class StackImpl<T>
Implementation of Stack
, based on ArrayList
.
Constructor Summary | |
---|---|
StackImpl()
|
Method Summary | |
---|---|
void |
clear()
Clears the whole stack. |
boolean |
isEmpty()
Checks whether the stack is empty. |
T |
peek()
Get the object from the top of the stack. |
T |
pop()
Pop the object from the top of the stack. |
void |
push(T o)
Push an object to the top of the stack. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StackImpl()
Method Detail |
---|
public void push(T o)
Stack
push
in interface Stack<T>
o
- object to push on toppublic T pop()
Stack
pop
in interface Stack<T>
public T peek()
Stack
peek
in interface Stack<T>
public boolean isEmpty()
Stack
isEmpty
in interface Stack<T>
true
if the stack is emptypublic void clear()
Stack
clear
in interface Stack<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |