All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class aioli.vtp.BackTrackStack

java.lang.Object
   |
   +----aioli.vtp.BackTrackStack

public class BackTrackStack
extends Object
implements Cloneable
A class that implements a backtrack stack used in pattern matching.


Method Index

 o clone()
Returns a copy of the backtrack stack.
 o empty()
Tests if this stack is empty.
 o peek()
Looks at the object at the top of this stack without removing it from the stack.
 o pop()
Removes the backtrack point at the top of this stack and returns that object as the value of this function.
 o push(BackTrackPoint)
Pushes a new backtrack point on to the top of the stack.
 o push(BackTrackStack)
Returns a new stack, with the given stack on top.
 o toString()
Returns a String that represent the current state of the stack.

Methods

 o clone
 public Object clone()
Returns a copy of the backtrack stack.

Overrides:
clone in class Object
 o push
 public BackTrackStack push(BackTrackStack st)
Returns a new stack, with the given stack on top. The elements are not cloned.

Parameters:
st - The stack to push on the current one.
 o push
 public BackTrackPoint push(BackTrackPoint item)
Pushes a new backtrack point on to the top of the stack.

Parameters:
item - The item to be pushed onto this stack.
Returns:
The item argument.
 o pop
 public synchronized BackTrackPoint pop()
Removes the backtrack point at the top of this stack and returns that object as the value of this function.

Returns:
The backtrack point at the top of this stack.
Throws: EmptyStackException
If the stack is empty.
 o peek
 public synchronized BackTrackPoint peek()
Looks at the object at the top of this stack without removing it from the stack.

Returns:
The backtrack point at the top of this stack.
Throws: EmptyStackException
If the stack is empty.
 o empty
 public boolean empty()
Tests if this stack is empty.

Returns:
true if this stack is empty; false otherwise.
 o toString
 public String toString()
Returns a String that represent the current state of the stack.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index