jd.xml.xpath.model.walk
Class DescendantsWalker

java.lang.Object
  extended byjd.xml.xpath.model.walk.DescendantsWalker
All Implemented Interfaces:
ModelWalker
Direct Known Subclasses:
PrecedingWalker

public class DescendantsWalker
extends Object
implements ModelWalker

DescendantsWalker implements a depth-first enumeration of the children of a XPathNode in document order.


Constructor Summary
DescendantsWalker()
           
DescendantsWalker(boolean includeStartNode)
           
 
Method Summary
 XPathNode gotoFirstNode(XPathNode startNode)
          Return the first node of the path defined by the startNode
 XPathNode gotoNextNode(XPathNode lastNode)
          Return the next node of the path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescendantsWalker

public DescendantsWalker()

DescendantsWalker

public DescendantsWalker(boolean includeStartNode)
Method Detail

gotoFirstNode

public XPathNode gotoFirstNode(XPathNode startNode)
Description copied from interface: ModelWalker
Return the first node of the path defined by the startNode

Specified by:
gotoFirstNode in interface ModelWalker
Returns:
the first node of the path represented by this ModelWalker.- If null the path is empty.

gotoNextNode

public XPathNode gotoNextNode(XPathNode lastNode)
Description copied from interface: ModelWalker
Return the next node of the path.

Specified by:
gotoNextNode in interface ModelWalker
Parameters:
lastNode - a XPathNode obtained from the last call to gotoFirstNode or gotoNextNode. If the node is another node the behaviour is not determined.
Returns:
the next node of the path represented by this ModelWalker.- If null then the path ended.