Package wt.visitor

Class DFSWalker

java.lang.Object
wt.visitor.BasicWalker
wt.visitor.Navigator
wt.visitor.DFSWalker
All Implemented Interfaces:
Walker

public class DFSWalker extends wt.visitor.Navigator
This class extends BasicWalker to implement a depth-first traversal of a structure. As each node is traversed, the visit methods are called on the Visitor object, the node is expanded, and the traverse method is called recursively on all of the expanded nodes. Note that during this depth first traversal, the parent nodes are always visited before the children nodes.

Supported API: true

Extendable: false
  • Field Summary

    Fields inherited from interface wt.visitor.Walker

    NODE_EXPANDER, VISITOR
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Traverses the root node using a depth first search.

    Methods inherited from class wt.visitor.BasicWalker

    clearVisitedNodes, getNodeExpander, getVisitor, isRecursionDetectionEnabled, registerVisitedNode, setNodeExpander, setRecursionDetectionEnabled, setVisitor

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • traverse

      public void traverse(Persistable root) throws WTException
      Traverses the root node using a depth first search.

      Supported API: true
      Parameters:
      root -
      Throws:
      WTException