Opus5
Class PostOrder

java.lang.Object
  |
  +--Opus5.AbstractPrePostVisitor
        |
        +--Opus5.PostOrder
All Implemented Interfaces:
PrePostVisitor

public class PostOrder
extends AbstractPrePostVisitor

Adapter to convert a Visitor to a PrePostVisitor. Used in conjunction with various depth-first traversal routines to implement postorder traversal.

Version:
$Id: PostOrder.java,v 3.2 1998/07/28 13:58:49 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
Tree.depthFirstTraversal(Opus5.PrePostVisitor), Graph.depthFirstTraversal(Opus5.PrePostVisitor, int)

Field Summary
protected  Visitor visitor
          A visitor.
 
Fields inherited from interface Opus5.PrePostVisitor
copyright
 
Constructor Summary
PostOrder(Visitor visitor)
          Constructs a PostOrder visitor using the specified visitor.
 
Method Summary
 boolean isDone()
          Invokes the isDone method on the visitor to which the the visitor field refers.
 void postVisit(java.lang.Object object)
          Invokes the visit method on the visitor to which the the visitor field refers using the specified object.
 
Methods inherited from class Opus5.AbstractPrePostVisitor
inVisit, preVisit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

visitor

protected Visitor visitor
A visitor.
Constructor Detail

PostOrder

public PostOrder(Visitor visitor)
Constructs a PostOrder visitor using the specified visitor.
Parameters:
visitor - The visitor to adapt.
Method Detail

postVisit

public void postVisit(java.lang.Object object)
Invokes the visit method on the visitor to which the the visitor field refers using the specified object.
Overrides:
postVisit in class AbstractPrePostVisitor
Parameters:
object - The object to visit.

isDone

public boolean isDone()
Invokes the isDone method on the visitor to which the the visitor field refers.
Overrides:
isDone in class AbstractPrePostVisitor
Returns:
True if the visitor is done.