Package org.htmlunit.xpath.xml.dtm.ref
Class DTMDefaultBaseTraversers.AncestorOrSelfTraverser
- java.lang.Object
-
- org.htmlunit.xpath.xml.dtm.DTMAxisTraverser
-
- org.htmlunit.xpath.xml.dtm.ref.DTMDefaultBaseTraversers.AncestorTraverser
-
- org.htmlunit.xpath.xml.dtm.ref.DTMDefaultBaseTraversers.AncestorOrSelfTraverser
-
- Enclosing class:
- DTMDefaultBaseTraversers
private class DTMDefaultBaseTraversers.AncestorOrSelfTraverser extends DTMDefaultBaseTraversers.AncestorTraverser
Implements traversal of the Ancestor access, in reverse document order.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateAncestorOrSelfTraverser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intfirst(int context)By the nature of the stateless traversal, the context node can not be returned or the iteration will go into an infinate loop.intfirst(int context, int expandedTypeID)By the nature of the stateless traversal, the context node can not be returned or the iteration will go into an infinate loop.-
Methods inherited from class org.htmlunit.xpath.xml.dtm.ref.DTMDefaultBaseTraversers.AncestorTraverser
next, next
-
-
-
-
Method Detail
-
first
public int first(int context)
By the nature of the stateless traversal, the context node can not be returned or the iteration will go into an infinate loop. So to traverse an axis, the first function must be used to get the first node.This method needs to be overloaded only by those axis that process the self node.
- Overrides:
firstin classDTMAxisTraverser- Parameters:
context- The context node of this traversal. This is the point that the traversal starts from.- Returns:
- the first node in the traversal.
-
first
public int first(int context, int expandedTypeID)By the nature of the stateless traversal, the context node can not be returned or the iteration will go into an infinate loop. So to traverse an axis, the first function must be used to get the first node.This method needs to be overloaded only by those axis that process the self node.
- Overrides:
firstin classDTMAxisTraverser- Parameters:
context- The context node of this traversal. This is the point of origin for the traversal -- its "root node" or starting point.expandedTypeID- The extended type ID that must match.- Returns:
- the first node in the traversal.
-
-