org.exolab.adaptx.util
public class QuickStack extends Object
Version: $Revision: 3633 $ $Date: 2003-03-01 02:38:44 -0500 (Sat, 01 Mar 2003) $
| Nested Class Summary | |
|---|---|
| class | QuickStack.StackIterator |
| Constructor Summary | |
|---|---|
| QuickStack()
Creates an empty Stack
| |
| Method Summary | |
|---|---|
| boolean | empty()
Tests for an empty Stack |
| Iterator | iterator()
Returns an Iterator for this Stack. |
| Object | peek()
Returns the Object that is currently on top of the Stack.
|
| Object | pop()
Removes and returns the Object that is currently on top of the Stack. |
| void | push(Object object)
Adds the given Object to the top of the Stack
|
| int | search(Object object)
Searches for the given Object in the stack and returns it's position
relative to the top of the Stack (ie the number of calls to #pop()
before the object is returned by #pop())
|
| int | size()
Returns the number of items on the Stack |
Returns: true if there are no elements on the stack, otherwise false.
Returns: the Object that is currently the top of the stack
Throws: java.util.EmptyStackException when there are no elements currently on the Stack
Returns: the Object that is currently the top of the stack
Throws: java.util.EmptyStackException when there are no elements currently on the Stack
Returns: the number of items on the Stack