net.sf.saxon.om

Class NodeArrayIterator

Implemented Interfaces:
AxisIterator, GroundedIterator, LastPositionFinder, LookaheadIterator, ReversibleIterator, SequenceIterator, UnfailingIterator

public class NodeArrayIterator
extends ArrayIterator
implements AxisIterator

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, start

Fields inherited from interface net.sf.saxon.om.SequenceIterator

GROUNDED, LAST_POSITION_FINDER, LOOKAHEAD

Constructor Summary

NodeArrayIterator(NodeInfo[] nodes)
NodeArrayIterator(NodeInfo[] nodes, int start, int end)

Method Summary

Value
atomize()
Return the atomized value of the current node.
SequenceIterator
getAnother()
Get another iterator over the same items
SequenceIterator
getReverseIterator()
Get an iterator that processes the same items in reverse order
CharSequence
getStringValue()
Return the string value of the current node.
AxisIterator
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 class net.sf.saxon.om.ArrayIterator

current, getAnother, getArray, getEndPosition, getLastPosition, getProperties, getReverseIterator, getStartPosition, hasNext, makeSliceIterator, materialize, next, position

Constructor Details

NodeArrayIterator

public NodeArrayIterator(NodeInfo[] nodes)

NodeArrayIterator

public NodeArrayIterator(NodeInfo[] nodes,
                         int start,
                         int end)

Method Details

atomize

public Value atomize()
            throws XPathException
Return the atomized value of the current node.
Specified by:
atomize in interface AxisIterator
Returns:
the atomized value.

getAnother

public SequenceIterator getAnother()
Get another iterator over the same items
Specified by:
getAnother in interface UnfailingIterator
getAnother in interface SequenceIterator
Overrides:
getAnother in interface ArrayIterator
Returns:
a new ArrayIterator

getReverseIterator

public SequenceIterator getReverseIterator()
Get an iterator that processes the same items in reverse order
Specified by:
getReverseIterator in interface ReversibleIterator
Overrides:
getReverseIterator in interface ArrayIterator
Returns:
a new ArrayIterator

getStringValue

public CharSequence getStringValue()
Return the string value of the current node.
Specified by:
getStringValue in interface AxisIterator
Returns:
the string value, as an instance of CharSequence.

iterateAxis

public AxisIterator iterateAxis(byte axis,
                                NodeTest test)
Return an iterator over an axis, starting at the current node.
Specified by:
iterateAxis in interface AxisIterator
Parameters:
axis - the axis to iterate over, using a constant such as Axis.CHILD
test - a predicate to apply to the nodes before returning them.

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:
moveNext in interface AxisIterator