org.jaxen.util

Class DescendantAxisIterator

public class DescendantAxisIterator extends Object implements Iterator

Represents the XPath descendant axis. The "descendant axis contains the descendants of the context node; a descendant is a child or a child of a child and so on; thus the descendant axis never contains attribute or namespace nodes."

Version: 1.2b12

Field Summary
Iteratorchildren
Navigatornavigator
ArrayListstack
Constructor Summary
DescendantAxisIterator(Object contextNode, Navigator navigator)
Create a new descendant axis iterator.
DescendantAxisIterator(Navigator navigator, Iterator iterator)
Method Summary
booleanhasNext()
Returns true if there are any descendants remaining; false otherwise.
Objectnext()
Returns the next descendant node.
voidremove()
This operation is not supported.

Field Detail

children

private Iterator children

navigator

private Navigator navigator

stack

private ArrayList stack

Constructor Detail

DescendantAxisIterator

public DescendantAxisIterator(Object contextNode, Navigator navigator)
Create a new descendant axis iterator.

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

DescendantAxisIterator

public DescendantAxisIterator(Navigator navigator, Iterator iterator)

Method Detail

hasNext

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

Returns: true if any descendants remain; false otherwise

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

next

public Object next()
Returns the next descendant node.

Returns: the next descendant node

Throws: NoSuchElementException if no descendants remain

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

remove

public void remove()
This operation is not supported.

Throws: UnsupportedOperationException always