Class NodeIteratorBase


public abstract class NodeIteratorBase
extends java.lang.Object
implements NodeIterator

Constructor Summary
Method Summary
 NodeIterator cloneIterator()
          Clones and resets this iterator.
 int getLast()
          Default implementation of getLast().
 int getPosition()
          Returns the position() in this iterator.
 NodeIterator includeSelf()
          Setter for _includeSelf flag.
 boolean isReverse()
          Indicates if position in this iterator is computed in reverse document order.
 NodeIterator reset()
          Reset this iterator using state from last call to setStartNode().
 void setRestartable(boolean isRestartable)
          Setter for _isRestartable flag.
abstract  NodeIterator setStartNode(int node)
          Initialize iterator using a node.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public NodeIteratorBase()
Method Detail


public void setRestartable(boolean isRestartable)
Setter for _isRestartable flag.
Specified by:
setRestartable in interface NodeIterator


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.
Specified by:
setStartNode in interface NodeIterator


public NodeIterator reset()
Reset this iterator using state from last call to setStartNode().
Specified by:
reset in interface NodeIterator


public NodeIterator includeSelf()
Setter for _includeSelf flag.


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.
Specified by:
getLast in interface NodeIterator


public int getPosition()
Returns the position() in this iterator.
Specified by:
getPosition in interface NodeIterator


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


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.
Specified by:
cloneIterator in interface NodeIterator

Copyright 2006 Apache XML Project. All Rights Reserved.