net.sf.saxon.om
Class Navigator.AxisFilter

java.lang.Object
  |
  +--net.sf.saxon.om.AxisIteratorImpl
        |
        +--net.sf.saxon.om.Navigator.AxisFilter
All Implemented Interfaces:
AxisIterator, SequenceIterator
Enclosing class:
Navigator

public static class Navigator.AxisFilter
extends AxisIteratorImpl

AxisFilter is an iterator that applies a NodeTest filter to the nodes returned by an underlying AxisIterator.


Field Summary
 
Fields inherited from class net.sf.saxon.om.AxisIteratorImpl
current, last, position
 
Constructor Summary
Navigator.AxisFilter(AxisIterator base, NodeTest test)
          Construct a AxisFilter
 
Method Summary
 void advance()
           
 SequenceIterator getAnother()
          Get another SequenceIterator that iterates over the same items as the original, but which is repositioned at the start of the sequence.
 int getLastPosition()
           
 boolean hasNext()
          Determine whether there are more nodes to come.
 Item next()
          Get the next node in sequence.
 
Methods inherited from class net.sf.saxon.om.AxisIteratorImpl
current, position
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Navigator.AxisFilter

public Navigator.AxisFilter(AxisIterator base,
                            NodeTest test)
Construct a AxisFilter

Parameters:
base - the underlying iterator that returns all the nodes on a required axis
test - a NodeTest that is applied to each node returned by the underlying AxisIterator; only those nodes that pass the NodeTest are returned by the AxisFilter
Method Detail

advance

public void advance()

next

public Item next()
Description copied from class: AxisIteratorImpl
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
Specified by:
next in class AxisIteratorImpl
Returns:
the next NodeInfo

hasNext

public boolean hasNext()
Description copied from class: AxisIteratorImpl
Determine whether there are more nodes to come.

Specified by:
hasNext in interface AxisIterator
Specified by:
hasNext in class AxisIteratorImpl
Returns:
true if there are more nodes

getLastPosition

public int getLastPosition()

getAnother

public SequenceIterator getAnother()
Description copied from interface: SequenceIterator
Get another SequenceIterator that iterates over the same items as the original, but which is repositioned at the start of the sequence.

Returns:
a SequenceIterator that iterates over the same items, positioned before the first item