XBinder C# Runtime Library
2.6
|
Provide a LIFO stack implementation. Internally, this is based on an ArrayList. More...
Public Member Functions | |
virtual void | addFirst (E e) |
Add the given element to top of the stack. More... | |
virtual E | peekFirst () |
Return the element on the top of the stack, but do not remove it. If the stack is empty, return null. More... | |
virtual E | removeFirst () |
Remove and return the element from the top of the stack. More... | |
virtual int | size () |
Properties | |
virtual bool | Empty [get] |
Return true if the stack is empty. More... | |
Provide a LIFO stack implementation. Internally, this is based on an ArrayList.
You may push null references onto the stack, but you must exercise caution when using the peekFirst method; it returns null to indicate when the stack is empty.
This could readily be replaced by java.util.Dequeue<T> once we move to Java 1.6.
<author> Kevin
</author>
|
virtual |
Add the given element to top of the stack.
e |
|
virtual |
Return the element on the top of the stack, but do not remove it. If the stack is empty, return null.
|
virtual |
Remove and return the element from the top of the stack.
<throws> NoSuchElementException if the stack is empty. </throws>
|
get |
Return true if the stack is empty.