All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class flybase.FastStack

java.lang.Object
   |
   +----flybase.FastVector
           |
           +----flybase.FastStack

public class FastStack
extends flybase.FastVector
A Last-In-First-Out(LIFO) stack of objects.


Constructor Index

 o FastStack()

Method Index

 o empty()
Returns true if the stack is empty.
 o peek()
Peeks at the top of the stack.
 o pop()
Pops an item off the stack.
 o push(Object)
Pushes an item onto the stack.
 o search(Object)
Sees if an object is on the stack.

Constructors

 o FastStack
 public FastStack()

Methods

 o push
 public java.lang.Object push(java.lang.Object item)
Pushes an item onto the stack.

Parameters:
item - the item to be pushed on.
 o pop
 public java.lang.Object pop()
Pops an item off the stack.

Throws: EmptyStackException
If the stack is empty.
 o peek
 public java.lang.Object peek()
Peeks at the top of the stack.

Throws: EmptyStackException
If the stack is empty.
 o empty
 public boolean empty()
Returns true if the stack is empty.

 o search
 public int search(java.lang.Object o)
Sees if an object is on the stack.

Parameters:
o - the desired object
Returns:
the distance from the top, or -1 if it is not found.

All Packages  Class Hierarchy  This Package  Previous  Next  Index