public class PrecedingSiblingAxisIterator extends Object implements Iterator
preceding-sibling
axis.
The "preceding-sibling
axis contains all the
preceding siblings of the context node; if the context node is an
attribute node or namespace node, the preceding-sibling
axis is empty."Constructor and Description |
---|
PrecedingSiblingAxisIterator(Object contextNode,
Navigator navigator)
Create a new
preceding-sibling axis iterator. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns true if there are any preceding siblings remaining; false otherwise.
|
Object |
next()
Returns the next preceding sibling.
|
void |
remove()
This operation is not supported.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public PrecedingSiblingAxisIterator(Object contextNode, Navigator navigator) throws UnsupportedAxisException
preceding-sibling
axis iterator.contextNode
- the node to start fromnavigator
- the object model specific navigatorUnsupportedAxisException
- if the navigator does not support the preceding-sibling axispublic boolean hasNext()
hasNext
in interface Iterator
Iterator.hasNext()
public Object next() throws NoSuchElementException
next
in interface Iterator
NoSuchElementException
- if no preceding siblings remainIterator.next()
public void remove() throws UnsupportedOperationException
remove
in interface Iterator
UnsupportedOperationException
- alwaysCopyright 2001–2022 The Jaxen Project. All rights reserved.