infovis.tree
Class StructureChecker

java.lang.Object
  extended by infovis.tree.StructureChecker
All Implemented Interfaces:
DepthFirst.Visitor

public class StructureChecker
extends Object
implements DepthFirst.Visitor

Checks the integrity of a tree.

Version:
$Revision: 1.10 $
Author:
Jean-Daniel Fekete

Constructor Summary
StructureChecker(Tree tree)
          Constructor for StructureChecker.
 
Method Summary
static boolean check(Tree tree)
           
 void postorder(int node)
          Method called when all the children of the node have been traversed.
 boolean preorder(int node)
          Method called when the node is initially reached.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructureChecker

public StructureChecker(Tree tree)
Constructor for StructureChecker.

Method Detail

preorder

public boolean preorder(int node)
Description copied from interface: DepthFirst.Visitor
Method called when the node is initially reached.

Specified by:
preorder in interface DepthFirst.Visitor
Parameters:
node - the reached node.
Returns:
true if the subtree should be traversed, false if it should be pruned from the traversal. In the latter case, the two other methods are not called for the node.

postorder

public void postorder(int node)
Description copied from interface: DepthFirst.Visitor
Method called when all the children of the node have been traversed.

Specified by:
postorder in interface DepthFirst.Visitor
Parameters:
node - the reached node.

check

public static boolean check(Tree tree)


Copyright 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.