org.jaxen.util
Class DescendantAxisIterator

java.lang.Object
  extended by org.jaxen.util.DescendantAxisIterator
All Implemented Interfaces:
Iterator
Direct Known Subclasses:
DescendantOrSelfAxisIterator

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

Constructor Summary
DescendantAxisIterator(Navigator navigator, Iterator iterator)
           
DescendantAxisIterator(Object contextNode, Navigator navigator)
          Create a new descendant axis iterator.
 
Method Summary
 boolean hasNext()
          Returns true if there are any descendants remaining; false otherwise.
 Object next()
          Returns the next descendant node.
 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

DescendantAxisIterator

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

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

DescendantAxisIterator

public DescendantAxisIterator(Navigator navigator,
                              Iterator iterator)
Method Detail

hasNext

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

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

next

public Object next()
Returns the next descendant node.

Specified by:
next in interface Iterator
Returns:
the next descendant node
Throws:
NoSuchElementException - if no descendants remain
See Also:
Iterator.next()

remove

public void remove()
This operation is not supported.

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException - always


Copyright © 2001-2008 Codehaus. All Rights Reserved.