|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.util.ArrayListStack
Stack class faster than the JAVA Stack class based on ArrayList (wich are faster than Vectors
Field Summary | |
private int |
depth
|
private int |
incrdepth
|
private int |
inidepth
|
private int |
maxdepth
|
(package private) java.util.ArrayList |
stack
|
Constructor Summary | |
ArrayListStack()
Creates a stack with the default initial depth |
|
ArrayListStack(int inidepth)
Creates a stack with a specified initial depth |
|
ArrayListStack(int inidepth,
int incrdepth)
Creates a stack with specified parameters |
Method Summary | |
boolean |
empty()
checks if the stack is empty |
java.lang.Object |
peek()
looks at the object on top of the stackwithout removing it |
java.lang.Object |
pop()
pops a object from the stack |
void |
push(java.lang.Object o)
pushes a object on the stack |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int inidepth
private int incrdepth
private int maxdepth
private int depth
java.util.ArrayList stack
Constructor Detail |
public ArrayListStack()
public ArrayListStack(int inidepth)
inidepth
- initial size of the stackpublic ArrayListStack(int inidepth, int incrdepth)
inidepth
- initial size of the stackincrdepth
- increment for extending the stackMethod Detail |
public void push(java.lang.Object o)
o
- object to push on top of the stackpublic java.lang.Object pop()
public java.lang.Object peek()
public boolean empty()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |