Opus5
Class AbstractPrePostVisitor

java.lang.Object
  |
  +--Opus5.AbstractPrePostVisitor
All Implemented Interfaces:
PrePostVisitor
Direct Known Subclasses:
InOrder, PostOrder, PreOrder

public abstract class AbstractPrePostVisitor
extends java.lang.Object
implements PrePostVisitor

The AbstractPrePostVisitor class is the base class from which all concrete pre/post visitor classes are derived. This abstract class provides default implementations for the methods declared in the PrePostVisitor interface.

Version:
$Id: AbstractPrePostVisitor.java,v 3.2 1998/07/28 13:04:34 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
PrePostVisitor

Fields inherited from interface Opus5.PrePostVisitor
copyright
 
Constructor Summary
AbstractPrePostVisitor()
           
 
Method Summary
 void inVisit(java.lang.Object object)
          "In"-visits the specified object.
 boolean isDone()
          Tests whether this visitor is done.
 void postVisit(java.lang.Object object)
          "Post"-visits the specified object.
 void preVisit(java.lang.Object object)
          "Pre"-visits the specified object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPrePostVisitor

public AbstractPrePostVisitor()
Method Detail

preVisit

public void preVisit(java.lang.Object object)
"Pre"-visits the specified object. Used in pre-order traversals. The default implementation does nothing.
Specified by:
preVisit in interface PrePostVisitor
Parameters:
object - The object to visit.
See Also:
PreOrder

inVisit

public void inVisit(java.lang.Object object)
"In"-visits the specified object. Used in in-order traversals. The default implementation does nothing.
Specified by:
inVisit in interface PrePostVisitor
Parameters:
object - The object to visit.
See Also:
InOrder

postVisit

public void postVisit(java.lang.Object object)
"Post"-visits the specified object. Used in post-order traversals. The default implementation does nothing.
Specified by:
postVisit in interface PrePostVisitor
Parameters:
object - The object to visit.
See Also:
PostOrder

isDone

public boolean isDone()
Tests whether this visitor is done. The default implementation always returns false.
Specified by:
isDone in interface PrePostVisitor
Returns:
True if this visitor is done.