net.sf.saxon.om
Interface AxisIterator

All Superinterfaces:
SequenceIterator
All Known Implementing Classes:
ArrayIterator, ArrayListIterator, AxisIteratorImpl, EmptyIterator, ReverseArrayIterator, SingletonIterator

public interface AxisIterator
extends SequenceIterator

A SequenceIterator is used to iterate over a sequence. An AxisIterator is a SequenceIterator that throws no exceptions; it also supports the ability to find the last() position, again with no exceptions. Despite its name, an AxisIterator is not invariably used to find nodes on an axis of a tree, though this is its most common use. For example, the class ArrayIterator is also defined as an AxisIterator.


Method Summary
 Item current()
          Get the current node in sequence.
 boolean hasNext()
          Determine whether there are more nodes to come.
 Item next()
          Get the next node in sequence.
 int position()
          Get the current position
 
Methods inherited from interface net.sf.saxon.om.SequenceIterator
getAnother
 

Method Detail

hasNext

public boolean hasNext()
Determine whether there are more nodes to come.

Specified by:
hasNext in interface SequenceIterator
Returns:
true if there are more nodes

next

public Item next()
Get the next node in sequence.

Specified by:
next in interface SequenceIterator
Returns:
the next NodeInfo

current

public Item current()
Get the current node in sequence.

Specified by:
current in interface SequenceIterator
Returns:
the current item, that is, the item most recently returned by next()

position

public int position()
Get the current position

Specified by:
position in interface SequenceIterator
Returns:
the position of the current item (the item most recently returned by next()), starting at 1 for the first node