public class AncestorOrSelfAxisIterator
extends java.lang.Object
implements java.util.Iterator
Represents the XPath ancestor-or-self axis.
The "ancestor-or-self axis contains the context node and
the ancestors of the context node; thus, the ancestor axis will
always include the root node."
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object |
contextNode |
private Navigator |
navigator |
| Constructor and Description |
|---|
AncestorOrSelfAxisIterator(java.lang.Object contextNode,
Navigator navigator)
Create a new
ancestor-or-self axis iterator. |
private java.lang.Object contextNode
private Navigator navigator
public AncestorOrSelfAxisIterator(java.lang.Object contextNode,
Navigator navigator)
ancestor-or-self axis iterator.contextNode - the node to start fromnavigator - the object model specific navigatorpublic boolean hasNext()
hasNext in interface java.util.IteratorIterator.hasNext()public java.lang.Object next()
next in interface java.util.Iteratorjava.util.NoSuchElementException - if no ancestors remainIterator.next()public void remove()
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException - always