org.apache.xalan.xsltc.dom

Class NodeIteratorBase

public abstract class NodeIteratorBase extends Object implements NodeIterator

Author: Jacek Ambroziak Santiago Pericas-Geertsen Morten Jorgensen

Method Summary
NodeIteratorcloneIterator()
Clones and resets this iterator.
intgetLast()
Default implementation of getLast().
intgetPosition()
Returns the position() in this iterator.
NodeIteratorincludeSelf()
Setter for _includeSelf flag.
booleanisReverse()
Indicates if position in this iterator is computed in reverse document order.
NodeIteratorreset()
Reset this iterator using state from last call to setStartNode().
voidsetRestartable(boolean isRestartable)
Setter for _isRestartable flag.
abstract NodeIteratorsetStartNode(int node)
Initialize iterator using a node.

Method Detail

cloneIterator

public NodeIterator cloneIterator()
Clones and resets this iterator. Note that the cloned iterator is not restartable. This is because cloning is needed for variable references, and the context node of the original variable declaration must be preserved.

getLast

public int getLast()
Default implementation of getLast(). Stores current position and current node, resets the iterator, counts all nodes and restores iterator to original state.

getPosition

public int getPosition()
Returns the position() in this iterator.

includeSelf

public NodeIterator includeSelf()
Setter for _includeSelf flag.

isReverse

public boolean isReverse()
Indicates if position in this iterator is computed in reverse document order. Note that nodes are always returned in document order.

reset

public NodeIterator reset()
Reset this iterator using state from last call to setStartNode().

setRestartable

public void setRestartable(boolean isRestartable)
Setter for _isRestartable flag.

setStartNode

public abstract NodeIterator setStartNode(int node)
Initialize iterator using a node. If iterator is not restartable, then do nothing. If node is equal to END then subsequent calls to next() must return END.
Copyright B) 2005 Apache XML Project. All Rights Reserved.