net.sf.saxon.tree
Class DescendantEnumeration

java.lang.Object
  extended bynet.sf.saxon.tree.TreeEnumeration
      extended bynet.sf.saxon.tree.DescendantEnumeration
All Implemented Interfaces:
AxisIterator, SequenceIterator

final class DescendantEnumeration
extends TreeEnumeration


Field Summary
protected  NodeImpl current
           
protected  NodeImpl next
           
protected  NodeTest nodeTest
           
protected  int position
           
protected  NodeImpl start
           
 
Constructor Summary
DescendantEnumeration(NodeImpl node, NodeTest nodeTest, boolean includeSelf)
           
 
Method Summary
protected  void advance()
          Advance along the axis until a node is found that matches the required criteria
protected  boolean conforms(NodeImpl node)
          Test whether a node conforms to the node type and name constraints.
 Item current()
          Return the current Item
 SequenceIterator getAnother()
          Get another enumeration of the same nodes
 Item next()
          Return the next node in the enumeration
 int position()
          Return the current position
protected  void step()
          Advance one step along the axis: the resulting node might not meet the required criteria for inclusion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

protected NodeImpl start

next

protected NodeImpl next

nodeTest

protected NodeTest nodeTest

current

protected NodeImpl current

position

protected int position
Constructor Detail

DescendantEnumeration

public DescendantEnumeration(NodeImpl node,
                             NodeTest nodeTest,
                             boolean includeSelf)
Method Detail

step

protected void step()
Description copied from class: TreeEnumeration
Advance one step along the axis: the resulting node might not meet the required criteria for inclusion

Specified by:
step in class TreeEnumeration

getAnother

public SequenceIterator getAnother()
Get another enumeration of the same nodes

Returns:
a new iterator over the same sequence

conforms

protected boolean conforms(NodeImpl node)
Test whether a node conforms to the node type and name constraints. Note that this returns true if the supplied node is null, this is a way of terminating a loop.


advance

protected final void advance()
Advance along the axis until a node is found that matches the required criteria


next

public final Item next()
Return the next node in the enumeration

Specified by:
next in interface AxisIterator
Returns:
the next Item. If there are no more nodes, return null.

current

public final Item current()
Return the current Item

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

position

public final int position()
Return the current position

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