| java.lang.Object org.apache.tapestry.ioc.util.Stack
Constructor Summary | |
public | Stack() Normal constructor supporting an initial size of 20. | public | Stack(int initialSize) Parameters: initialSize - the initial size of the internal array (which will be expanded as necessary). |
Method Summary | |
public boolean | isEmpty() Returns true if the stack is empty. | public E | peek() Returns the top element of the stack without affecting the stack. | public E | pop() Pops the top element off the stack and returns it. | public void | push(E item) Pushes a new item onto the stack. | public String | toString() Describes the stack, listing the element in order of depth (top element first). |
Stack | public Stack()(Code) | | Normal constructor supporting an initial size of 20.
|
Stack | public Stack(int initialSize)(Code) | | Parameters: initialSize - the initial size of the internal array (which will be expanded as necessary). Forbest efficiency, set this to the maximum depth of the stack. |
isEmpty | public boolean isEmpty()(Code) | | Returns true if the stack is empty.
|
peek | public E peek()(Code) | | Returns the top element of the stack without affecting the stack.
top element on the stack throws: IllegalStateException - if the stack is empty |
pop | public E pop()(Code) | | Pops the top element off the stack and returns it.
the top element of the stack throws: IllegalStateException - if the stack is empty |
push | public void push(E item)(Code) | | Pushes a new item onto the stack.
|
toString | public String toString()(Code) | | Describes the stack, listing the element in order of depth (top element first).
string description of the stack |
|
|