<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.util.Stack
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.util.html">This Package</a>  <a href="java.util.SimpleTimeZone.html#_top_">Previous</a>  <a href="java.util.StringTokenizer.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.util.Stack
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.util.Vector.html#_top_">java.util.Vector</a>
           |
           +----java.util.Stack
</pre>
<hr>
<dl>
  <dt> public class <b>Stack</b>
  <dt> extends <a href="java.util.Vector.html#_top_">Vector</a>
</dl>
The <code>Stack</code> class represents a last-in-first-out 
 (LIFO) stack of objects.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Stack()"><b>Stack</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#empty()"><b>empty</b></a>()
  <dd>  Tests if this stack is empty.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#peek()"><b>peek</b></a>()
  <dd>  Looks at the object at the top of this stack without removing it 
 from the stack.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#pop()"><b>pop</b></a>()
  <dd>  Removes the object at the top of this stack and returns that 
 object as the value of this function.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#push(java.lang.Object)"><b>push</b></a>(Object)
  <dd>  Pushes an item onto the top of this stack.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#search(java.lang.Object)"><b>search</b></a>(Object)
  <dd>  Returns where an object is on this stack.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Stack"></a>
<a name="Stack()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Stack</b>
<pre>
 public Stack()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="push(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="push"><b>push</b></a>
<pre>
 public <a href="java.lang.Object.html#_top_">Object</a> push(<a href="java.lang.Object.html#_top_">Object</a> item)
</pre>
<dl>
  <dd> Pushes an item onto the top of this stack.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> item - the item to be pushed onto this stack.
    <dt> <b>Returns:</b>
    <dd> the <code>item</code> argument.
  </dl></dd>
</dl>
<a name="pop()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="pop"><b>pop</b></a>
<pre>
 public synchronized <a href="java.lang.Object.html#_top_">Object</a> pop()
</pre>
<dl>
  <dd> Removes the object at the top of this stack and returns that 
 object as the value of this function.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> The object at the top of this stack.
    <dt> <b>Throws:</b> <a href="java.util.EmptyStackException.html#_top_">EmptyStackException</a>
    <dd> if this stack is empty.
  </dl></dd>
</dl>
<a name="peek()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="peek"><b>peek</b></a>
<pre>
 public synchronized <a href="java.lang.Object.html#_top_">Object</a> peek()
</pre>
<dl>
  <dd> Looks at the object at the top of this stack without removing it 
 from the stack.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the object at the top of this stack.
    <dt> <b>Throws:</b> <a href="java.util.EmptyStackException.html#_top_">EmptyStackException</a>
    <dd> if this stack is empty.
  </dl></dd>
</dl>
<a name="empty()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="empty"><b>empty</b></a>
<pre>
 public boolean empty()
</pre>
<dl>
  <dd> Tests if this stack is empty.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if this stack is empty;
          <code>false</code> otherwise.
  </dl></dd>
</dl>
<a name="search(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="search"><b>search</b></a>
<pre>
 public synchronized int search(<a href="java.lang.Object.html#_top_">Object</a> o)
</pre>
<dl>
  <dd> Returns where an object is on this stack.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> o - the desired object.
    <dt> <b>Returns:</b>
    <dd> the distance from the top of the stack where the object is]
          located; the return value <code>-1</code> indicates that the
          object is not on the stack.
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.util.html">This Package</a>  <a href="java.util.SimpleTimeZone.html#_top_">Previous</a>  <a href="java.util.StringTokenizer.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
