net.sf.saxon.om
Class AxisIteratorImpl
java.lang.Object
|
+--net.sf.saxon.om.AxisIteratorImpl
- All Implemented Interfaces:
- AxisIterator, SequenceIterator
- Direct Known Subclasses:
- Navigator.AxisFilter, Navigator.BaseEnumeration
- public abstract class AxisIteratorImpl
- extends java.lang.Object
- implements AxisIterator
A SequenceIterator is used to iterate over a sequence. An AxisIterator
is a SequenceIterator that always iterates over a set of nodes, and that
throws no exceptions; it also supports the ability
to find the last() position, again with no exceptions.
This class is an abstract implementation of AxisIterator that is used
as a base class for many concrete implementations. The main functionality
that it provides is maintaining the current position.
Method Summary |
Item |
current()
Get the current node in the sequence. |
abstract boolean |
hasNext()
Determine whether there are more nodes to come. |
abstract Item |
next()
Get the next node in sequence. |
int |
position()
Get the current position |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
last
protected int last
position
protected int position
current
protected NodeInfo current
AxisIteratorImpl
public AxisIteratorImpl()
hasNext
public abstract boolean hasNext()
- Determine whether there are more nodes to come.
- Specified by:
hasNext
in interface AxisIterator
- Returns:
- true if there are more nodes
next
public abstract Item next()
- Get the next node in sequence. The implementation of this method must
return the next node; it must also set the variable current to this node,
and the variable position to the position of the node.
- Specified by:
next
in interface AxisIterator
- Returns:
- the next NodeInfo
current
public final Item current()
- Get the current node in the sequence.
- Specified by:
current
in interface AxisIterator
- Returns:
- the node returned by the most recent call on next()
position
public final int position()
- Get the current position
- Specified by:
position
in interface AxisIterator
- Returns:
- the position of the most recent node returned by next()