Package net.sf.saxon.om
Interface AxisIterator
- All Superinterfaces:
SequenceIterator
,UnfailingIterator
- All Known Implementing Classes:
AxisIteratorImpl
,EmptyIterator
,NamespaceIterator
,Navigator.AncestorEnumeration
,Navigator.AxisFilter
,Navigator.BaseEnumeration
,Navigator.DescendantEnumeration
,Navigator.FollowingEnumeration
,Navigator.PrecedingEnumeration
,NodeArrayIterator
,NodeListIterator
,PrependIterator
,ReverseNodeArrayIterator
,SingleNodeIterator
,VirtualCopy.VirtualCopier
,VirtualUntypedCopy.VirtualUntypedCopier
A SequenceIterator is used to iterate over a sequence. An AxisIterator
is a SequenceIterator that throws no exceptions, and that always returns
nodes. The nodes should all be in the same document (though there are
some cases, such as PrependIterator, where this is the responsibility of the
user of the class and is not enforced.)
-
Field Summary
Fields inherited from interface net.sf.saxon.om.SequenceIterator
GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD
-
Method Summary
Modifier and TypeMethodDescriptionatomize()
Return the atomized value of the current node.Return the string value of the current node.iterateAxis
(byte axis, NodeTest test) Return an iterator over an axis, starting at the current node.boolean
moveNext()
Move to the next node, without returning it.Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, getProperties
Methods inherited from interface net.sf.saxon.om.UnfailingIterator
current, getAnother, next, position
-
Method Details
-
moveNext
boolean moveNext()Move to the next node, without returning it. Returns true if there is a next node, false if the end of the sequence has been reached. After calling this method, the current node may be retrieved using the current() function. -
iterateAxis
Return an iterator over an axis, starting at the current node.- Parameters:
axis
- the axis to iterate over, using a constant such asAxis.CHILD
test
- a predicate to apply to the nodes before returning them.- Throws:
NullPointerException
- if there is no current node
-
atomize
Return the atomized value of the current node.- Returns:
- the atomized value.
- Throws:
NullPointerException
- if there is no current nodeXPathException
-
getStringValue
CharSequence getStringValue()Return the string value of the current node.- Returns:
- the string value, as an instance of CharSequence.
- Throws:
NullPointerException
- if there is no current node
-