org.jaxen.util
Class AncestorOrSelfAxisIterator
java.lang.Objectorg.jaxen.util.AncestorOrSelfAxisIterator
- Iterator
public class AncestorOrSelfAxisIterator
extends java.lang.Object
implements 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."
boolean | hasNext()- Returns true if there are any nodes remaining
on the ancestor-or-self axis; false otherwise.
|
Object | next()- Returns the next ancestor-or-self node.
|
void | remove()- This operation is not supported.
|
contextNode
private Object contextNode
AncestorOrSelfAxisIterator
public AncestorOrSelfAxisIterator(Object contextNode,
Navigator navigator) Create a new ancestor-or-self axis iterator.
contextNode - the node to start fromnavigator - the object model specific navigator
hasNext
public boolean hasNext()
Returns true if there are any nodes remaining
on the ancestor-or-self axis; false otherwise.
- true if any ancestors or self remain
java.util.Iterator.hasNext()
next
public Object next()
Returns the next ancestor-or-self node.
- the next ancestor-or-self node
java.util.Iterator.next()
remove
public void remove()
This operation is not supported.