net.sf.saxon.om

Class NodeListIterator

public class NodeListIterator extends ListIterator implements AxisIterator

Specialization of ListIterator for use when the items in the list are all nodes
Constructor Summary
NodeListIterator(List list)
Create a NodeListIterator.
Method Summary
Valueatomize()
Return the atomized value of the current node.
CharSequencegetStringValue()
Return the string value of the current node.
AxisIteratoriterateAxis(byte axis, NodeTest test)
Return an iterator over an axis, starting at the current node.
booleanmoveNext()
Move to the next node, without returning it.

Constructor Detail

NodeListIterator

public NodeListIterator(List list)
Create a NodeListIterator.

Parameters: list the list, all of whose members must be instances of NodeInfo (this is not checked)

Method Detail

atomize

public Value atomize()
Return the atomized value of the current node.

Returns: the atomized value.

Throws: NullPointerException if there is no current node

getStringValue

public 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

iterateAxis

public AxisIterator iterateAxis(byte axis, NodeTest test)
Return an iterator over an axis, starting at the current node.

Parameters: axis the axis to iterate over, using a constant such as CHILD test a predicate to apply to the nodes before returning them.

Throws: NullPointerException if there is no current node

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.