public class FollowingSiblingAxisIterator
extends java.lang.Object
implements java.util.Iterator
following-sibling
axis.
The "following-sibling
axis contains all the
folowing siblings of the context node; if the context node is an
attribute node or namespace node, the following-sibling
axis is empty."Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
contextNode |
private Navigator |
navigator |
private java.util.Iterator |
siblingIter |
Constructor and Description |
---|
FollowingSiblingAxisIterator(java.lang.Object contextNode,
Navigator navigator)
Create a new
following-sibling axis iterator. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns true if there are any following siblings remain; false otherwise.
|
private void |
init() |
java.lang.Object |
next()
Returns the next following sibling.
|
void |
remove()
This operation is not supported.
|
private java.lang.Object contextNode
private Navigator navigator
private java.util.Iterator siblingIter
public FollowingSiblingAxisIterator(java.lang.Object contextNode, Navigator navigator) throws UnsupportedAxisException
following-sibling
axis iterator.contextNode
- the node to start fromnavigator
- the object model specific navigatorUnsupportedAxisException
private void init() throws UnsupportedAxisException
UnsupportedAxisException
public boolean hasNext()
hasNext
in interface java.util.Iterator
Iterator.hasNext()
public java.lang.Object next() throws java.util.NoSuchElementException
next
in interface java.util.Iterator
java.util.NoSuchElementException
- if no following siblings remainIterator.next()
public void remove() throws java.lang.UnsupportedOperationException
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
- always