Package org.jaxen.util
Class PrecedingSiblingAxisIterator
- java.lang.Object
-
- org.jaxen.util.PrecedingSiblingAxisIterator
-
- All Implemented Interfaces:
java.util.Iterator
public class PrecedingSiblingAxisIterator extends java.lang.Object implements java.util.Iterator
Represents the XPathpreceding-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, thepreceding-sibling
axis is empty."- Version:
- 1.2b12
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object
contextNode
private Navigator
navigator
private java.lang.Object
nextObj
private java.util.Iterator
siblingIter
-
Constructor Summary
Constructors Constructor Description PrecedingSiblingAxisIterator(java.lang.Object contextNode, Navigator navigator)
Create a newpreceding-sibling
axis iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Returns true if there are any preceding siblings remaining; false otherwise.private void
init()
java.lang.Object
next()
Returns the next preceding sibling.void
remove()
This operation is not supported.
-
-
-
Field Detail
-
contextNode
private java.lang.Object contextNode
-
navigator
private Navigator navigator
-
siblingIter
private java.util.Iterator siblingIter
-
nextObj
private java.lang.Object nextObj
-
-
Constructor Detail
-
PrecedingSiblingAxisIterator
public PrecedingSiblingAxisIterator(java.lang.Object contextNode, Navigator navigator) throws UnsupportedAxisException
Create a newpreceding-sibling
axis iterator.- Parameters:
contextNode
- the node to start fromnavigator
- 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 preceding siblings remaining; false otherwise.- Specified by:
hasNext
in interfacejava.util.Iterator
- Returns:
- true if any preceding siblings remain; false otherwise
- See Also:
Iterator.hasNext()
-
next
public java.lang.Object next() throws java.util.NoSuchElementException
Returns the next preceding sibling.- Specified by:
next
in interfacejava.util.Iterator
- Returns:
- the next preceding sibling
- Throws:
java.util.NoSuchElementException
- if no preceding siblings remain- See Also:
Iterator.next()
-
remove
public void remove() throws java.lang.UnsupportedOperationException
This operation is not supported.- Specified by:
remove
in interfacejava.util.Iterator
- Throws:
java.lang.UnsupportedOperationException
-
-