org.cip4.jdflib.elementwalker
Class ElementWalker

java.lang.Object
  extended by org.cip4.jdflib.elementwalker.ElementWalker
Direct Known Subclasses:
BaseElementWalker

public class ElementWalker
extends Object

elementwalker class that allows you to traverse a dom tree starting at a given root

Author:
prosirai

Field Summary
protected  IWalkerFactory theFactory
           
 
Constructor Summary
ElementWalker(IWalkerFactory _theFactory)
           
 
Method Summary
 String toString()
           
 int walkTree(KElement e, KElement trackElem)
          walk the tree starting at e.
 int walkTreeKidsFirst(KElement e)
          walk the tree starting at e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

theFactory

protected IWalkerFactory theFactory
Constructor Detail

ElementWalker

public ElementWalker(IWalkerFactory _theFactory)
Parameters:
_theFactory - used to find the individual instances for the children
Method Detail

walkTree

public int walkTree(KElement e,
                    KElement trackElem)
walk the tree starting at e.

Parameters:
e - the root element to walk, must not be null
trackElem - a parallel element to e that may additionally be modified during the walk, may be null
Returns:
n the number of traversed elements

walkTreeKidsFirst

public int walkTreeKidsFirst(KElement e)
walk the tree starting at e.

Parameters:
e - the root element to walk
Returns:
n the number of traversed elements

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2013. All Rights Reserved.