net.sf.saxon.tinytree
Class SiblingEnumeration
java.lang.Object
net.sf.saxon.om.AxisIteratorImpl
net.sf.saxon.tinytree.SiblingEnumeration
- All Implemented Interfaces:
- AtomizableIterator, AxisIterator, SequenceIterator
- final class SiblingEnumeration
- extends AxisIteratorImpl
This class supports both the child:: and following-sibling:: axes, which are
identical except for the route to the first candidate node.
It enumerates either the children or the following siblings of the specified node.
In the case of children, the specified node must always
be a node that has children: to ensure this, construct the enumeration
using NodeInfo#getEnumeration()
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SiblingEnumeration
protected SiblingEnumeration(TinyDocumentImpl doc,
TinyNodeImpl node,
NodeTest nodeTest,
boolean getChildren)
- Return an enumeration over children or siblings of the context node
- Parameters:
doc
- The Document node containing the context nodenode
- The context node, the start point for the iterationnodeTest
- Test that the selected nodes must satisfy, or null indicating
that all nodes are selectedgetChildren
- True if children of the context node are to be returned, false
if following siblings are required
next
public Item next()
- Description copied from interface:
AxisIterator
- Get the next item in the sequence.
- Returns:
- the next Item. If there are no more nodes, return null.
getAnother
public SequenceIterator getAnother()
- Get another enumeration of the same nodes
- Returns:
- a new iterator over the same sequence