Class ElementWalker

java.lang.Object
org.cip4.jdflib.elementwalker.ElementWalker
Direct Known Subclasses:
BaseElementWalker, PackageElementWalker

public class ElementWalker extends Object
elementwalker class that allows you to traverse a dom tree starting at a given root
  • Field Details

  • Constructor Details

    • ElementWalker

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

    • 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:
    • getFactory

      public IWalkerFactory getFactory()
      Getter for theFactory attribute.
      Returns:
      the theFactory