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.
-
clone()
- Returns a copy of the backtrack stack.
-
empty()
- Tests if this stack is empty.
-
peek()
- Looks at the object at the top of this stack
without removing it from the stack.
-
pop()
- Removes the backtrack point at the top of this stack and returns
that object as the value of this function.
-
push(BackTrackPoint)
- Pushes a new backtrack point on to the top of the stack.
-
push(BackTrackStack)
- Returns a new stack, with the given stack on top.
-
toString()
- Returns a String that represent the current state of the stack.
clone
public Object clone()
- Returns a copy of the backtrack stack.
- Overrides:
- clone in class Object
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.
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.
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.
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.
empty
public boolean empty()
- Tests if this stack is empty.
- Returns:
- true if this stack is empty; false otherwise.
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