org.basex.query.iter
Class AxisIter

java.lang.Object
  extended by org.basex.query.iter.Iter
      extended by org.basex.query.iter.NodeIter
          extended by org.basex.query.iter.AxisIter
All Implemented Interfaces:
java.lang.Iterable<ANode>
Direct Known Subclasses:
AxisMoreIter, NodeSeqBuilder

public abstract class AxisIter
extends NodeIter
implements java.lang.Iterable<ANode>

Interface for light-weight axis iterators, throwing no exceptions. This class also implements the Iterable interface, which is why all of its values can also be retrieved via enhanced for (for-each) loops. Note, however, that using the next() method will give you better performance. Important: to improve performance, this iterator may return the same node instance with updated values. If resulting nodes are to be further processed, they need to be finalized via ANode.finish().

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Constructor Summary
AxisIter()
           
 
Method Summary
 java.util.Iterator<ANode> iterator()
           
abstract  ANode next()
          Returns the next item or null if no other items are found.
 
Methods inherited from class org.basex.query.iter.Iter
get, reset, size, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxisIter

public AxisIter()
Method Detail

next

public abstract ANode next()
Description copied from class: Iter
Returns the next item or null if no other items are found.

Specified by:
next in class NodeIter
Returns:
resulting item or null

iterator

public final java.util.Iterator<ANode> iterator()
Specified by:
iterator in interface java.lang.Iterable<ANode>