org.jaxen.util
Class FollowingSiblingAxisIterator

java.lang.Object
  extended by org.jaxen.util.FollowingSiblingAxisIterator
All Implemented Interfaces:
java.util.Iterator

public class FollowingSiblingAxisIterator
extends java.lang.Object
implements java.util.Iterator

Represents the XPath 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."

Version:
1.2b12

Field Summary
private  java.lang.Object contextNode
           
private  Navigator navigator
           
private  java.util.Iterator siblingIter
           
 
Constructor Summary
FollowingSiblingAxisIterator(java.lang.Object contextNode, Navigator navigator)
          Create a new following-sibling axis iterator.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contextNode

private java.lang.Object contextNode

navigator

private Navigator navigator

siblingIter

private java.util.Iterator siblingIter
Constructor Detail

FollowingSiblingAxisIterator

public FollowingSiblingAxisIterator(java.lang.Object contextNode,
                                    Navigator navigator)
                             throws UnsupportedAxisException
Create a new following-sibling axis iterator.

Parameters:
contextNode - the node to start from
navigator - the object model specific navigator
Throws:
UnsupportedAxisException
Method Detail

init

private void init()
           throws UnsupportedAxisException
Throws:
UnsupportedAxisException

hasNext

public boolean hasNext()
Returns true if there are any following siblings remain; false otherwise.

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if any following siblings remain; false otherwise
See Also:
Iterator.hasNext()

next

public java.lang.Object next()
                      throws java.util.NoSuchElementException
Returns the next following sibling.

Specified by:
next in interface java.util.Iterator
Returns:
the next following sibling
Throws:
java.util.NoSuchElementException - if no following siblings remain
See Also:
Iterator.next()

remove

public void remove()
            throws java.lang.UnsupportedOperationException
This operation is not supported.

Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - always