Package net.sf.saxon.om
Class NodeArrayIterator
java.lang.Object
net.sf.saxon.om.ArrayIterator
net.sf.saxon.om.NodeArrayIterator
- All Implemented Interfaces:
LastPositionFinder,ReversibleIterator,AxisIterator,GroundedIterator,LookaheadIterator,SequenceIterator,UnfailingIterator
An iterator over an array of nodes. This is the same as
ArrayIterator, except that the iterator is an AxisIterator-
Field Summary
Fields inherited from class net.sf.saxon.om.ArrayIterator
end, items, startFields inherited from interface net.sf.saxon.om.SequenceIterator
GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD -
Constructor Summary
ConstructorsConstructorDescriptionNodeArrayIterator(NodeInfo[] nodes) NodeArrayIterator(NodeInfo[] nodes, int start, int end) -
Method Summary
Modifier and TypeMethodDescriptionatomize()Return the atomized value of the current node.Get another iterator over the same itemsGet an iterator that processes the same items in reverse orderReturn the string value of the current node.iterateAxis(byte axis, NodeTest test) Return an iterator over an axis, starting at the current node.booleanmoveNext()Move to the next node, without returning it.Methods inherited from class net.sf.saxon.om.ArrayIterator
close, current, getArray, getEndPosition, getLastPosition, getProperties, getStartPosition, hasNext, makeSliceIterator, materialize, next, positionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.om.SequenceIterator
close, getPropertiesMethods inherited from interface net.sf.saxon.om.UnfailingIterator
current, next, position
-
Constructor Details
-
NodeArrayIterator
-
NodeArrayIterator
-
-
Method Details
-
moveNext
public 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.- Specified by:
moveNextin interfaceAxisIterator
-
iterateAxis
Return an iterator over an axis, starting at the current node.- Specified by:
iterateAxisin interfaceAxisIterator- Parameters:
axis- the axis to iterate over, using a constant such asAxis.CHILDtest- 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.- Specified by:
atomizein interfaceAxisIterator- Returns:
- the atomized value.
- Throws:
NullPointerException- if there is no current nodeXPathException
-
getStringValue
Return the string value of the current node.- Specified by:
getStringValuein interfaceAxisIterator- Returns:
- the string value, as an instance of CharSequence.
- Throws:
NullPointerException- if there is no current node
-
getAnother
Get another iterator over the same items- Specified by:
getAnotherin interfaceSequenceIterator- Specified by:
getAnotherin interfaceUnfailingIterator- Overrides:
getAnotherin classArrayIterator- Returns:
- a new ArrayIterator
-
getReverseIterator
Get an iterator that processes the same items in reverse order- Specified by:
getReverseIteratorin interfaceReversibleIterator- Overrides:
getReverseIteratorin classArrayIterator- Returns:
- a new ArrayIterator
-