org.vizzini.util.tree
Class ToStringVisitor

java.lang.Object
  extended by org.vizzini.util.tree.ToStringVisitor
All Implemented Interfaces:
IVisitor

public class ToStringVisitor
extends Object
implements IVisitor

Provides a visitor which traverses a tree to accumulate the tree node strings.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
ToStringVisitor()
          Construct this object.
 
Method Summary
 String getString()
          Return the accumulated tree node strings.
 void reset()
          Reset the string buffer.
 void visit(ITreeNode treeNode)
          Visit the given tree node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToStringVisitor

public ToStringVisitor()
Construct this object.

Since:
v0.3
Method Detail

getString

public String getString()
Return the accumulated tree node strings.

Since:
v0.3

reset

public void reset()
Reset the string buffer.

Since:
v0.3

visit

public void visit(ITreeNode treeNode)
Visit the given tree node.

Specified by:
visit in interface IVisitor
Parameters:
treeNode - Tree node.
Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02