org.jaxen.util

Class PrecedingSiblingAxisIterator

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

Field Summary
ObjectcontextNode
Navigatornavigator
ObjectnextObj
IteratorsiblingIter
Constructor Summary
PrecedingSiblingAxisIterator(Object contextNode, Navigator navigator)
Create a new preceding-sibling axis iterator.
Method Summary
booleanhasNext()
Returns true if there are any preceding siblings remaining; false otherwise.
voidinit()
Objectnext()
Returns the next preceding sibling.
voidremove()
This operation is not supported.

Field Detail

contextNode

private Object contextNode

navigator

private Navigator navigator

nextObj

private Object nextObj

siblingIter

private Iterator siblingIter

Constructor Detail

PrecedingSiblingAxisIterator

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

Parameters: contextNode the node to start from navigator the object model specific navigator

Method Detail

hasNext

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

Returns: true if any preceding siblings remain; false otherwise

See Also: java.util.Iterator#hasNext()

init

private void init()

next

public Object next()
Returns the next preceding sibling.

Returns: the next preceding sibling

Throws: NoSuchElementException if no preceding siblings remain

See Also: java.util.Iterator#next()

remove

public void remove()
This operation is not supported.

Throws: UnsupportedOperationException