|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.exolab.adaptx.util.List
|
+--org.exolab.adaptx.util.ListStack
A representation of a Stack that does not use Synchronization. For compatibility this class supports the same methods as a java.util.Stack (JDK)
| Constructor Summary | |
|---|---|
ListStack()
Creates an empty Stack |
|
| Method Summary | |
|---|---|
boolean |
empty()
Tests for an empty Stack |
java.lang.Object |
peek()
Returns the Object that is currently on top of the Stack. |
java.lang.Object |
pop()
Removes and returns the Object that is currently on top of the Stack. |
void |
push(java.lang.Object object)
Adds the given Object to the top of the Stack |
int |
search(java.lang.Object object)
Searches for the given Object in the stack and returns it's position relative to the top of the Stack. |
| Methods inherited from class org.exolab.adaptx.util.List |
|---|
add, add, clear, clone, contains, equals, get, hashCode, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, subList, toArray, toArray, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ListStack()
| Method Detail |
public boolean empty()
public java.lang.Object peek()
throws java.util.EmptyStackException
java.util.EmptyStackException - when there are no
elements currently on the Stack
public java.lang.Object pop()
throws java.util.EmptyStackException
java.util.EmptyStackException - when there are no
elements currently on the Stackpublic void push(java.lang.Object object)
public int search(java.lang.Object object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||