Object
|
--AbstractList
|
--Vector
|
--Stack
Classes extended from Stack: The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with five operations that allow a vector to be treated as a stack. The usual push and pop operations are provided, as well as a method to peek at the top item on the stack, a method to test for whether the stack is empty, and a method to search the stack for an item and discover how far it is from the top. <p/>When a stack is first created, it contains no items.
utilJapha 1.0Ryan Gantt
@add()addAll()equals()get()indexOf()listIterator()remove()removeRange()set()subList()__construct()Tests if this stack is empty.
<tt>true</tt> if and only if this stack contains no items; <tt>false</tt> otherwise.
Tests if this stack is empty.
@
Looks at the object at the top of this stack without removing it from the stack.
object at the top of this stack (the last item of the <tt>Vector</tt> object).
@
public
EmptyStackException if this stack is empty.
@
Looks at the object at the top of this stack without removing it from the stack.
@
Removes the object at the top of this stack and returns that object as the value of this function.
object at the top of this stack (the last item of the <tt>Vector</tt> object).
@
public
EmptyStackException if this stack is empty.
@
Removes the object at the top of this stack and returns that object as the value of this function.
@
Pushes an item onto the top of this stack.
<tt>object</tt> argument.
@
public
Vector.addElement(java.lang.Object)
@
Pushes an item onto the top of this stack. This has exactly the same effect as: <p/><tt>addElement(item)</tt>
@
Returns the 1-based position where an object is on this stack. If the <tt>object</tt> occurs as an item in this stack, this method returns the distance from the top of the stack of the occurrence nearest the top of the stack; the topmost item on the stack is considered to be at distance 1. The equals method is used to compare <tt>object</tt> to the items in this stack.
The 1-based position from the top of the stack where the object is located; the return value -1 indicates that the object is not on the stack.
@
public
Returns the 1-based position where an object is on this stack.
@
Overrides: Vector::__construct()
Creates an empty Stack
public