org.jaxen.util
Class PrecedingSiblingAxisIterator

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

public class PrecedingSiblingAxisIterator
extends Object
implements Iterator

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

Version:
1.2b12

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

Constructor Detail

PrecedingSiblingAxisIterator

public PrecedingSiblingAxisIterator(Object contextNode,
                                    Navigator navigator)
                             throws UnsupportedAxisException
Create a new preceding-sibling axis iterator.

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

hasNext

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

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

next

public Object next()
            throws NoSuchElementException
Returns the next preceding sibling.

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

remove

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

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException


Copyright © 2001-2008 Codehaus. All Rights Reserved.