Modifier and Type | Field and Description |
---|---|
protected boolean | _includeSelf
Flag indicating if "self" should be returned. |
protected boolean | _isRestartable
Flag indicating if iterator can be restarted. |
protected int | _last
Cached computed value of last(). |
protected int | _markedNode
Store node in call to setMark(). |
protected int | _position
Value of position() in this iterator. |
protected int | _startNode
Store node in call to setStartNode(). |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public NodeIterator | cloneIterator()
Implements com. Clones and resets this iterator. |
public int | getLast()
Implements com. Default implementation of getLast(). |
public int | getPosition()
Implements com. Returns the position() in this iterator. |
public NodeIterator | |
public boolean | isReverse()
Implements com. Indicates if position in this iterator is computed in reverse document order. |
public NodeIterator | reset()
Implements com. Reset this iterator using state from last call to setStartNode(). |
protected final NodeIterator | |
protected final int | |
public void | setRestartable(boolean isRestartable)
Implements com. Setter for _isRestartable flag. |
public abstract NodeIterator | setStartNode(int node)
Redeclares com. Initialize iterator using a node. |
_includeSelf | back to summary |
---|---|
protected boolean _includeSelf Flag indicating if "self" should be returned. |
_isRestartable | back to summary |
---|---|
protected boolean _isRestartable Flag indicating if iterator can be restarted. |
_last | back to summary |
---|---|
protected int _last Cached computed value of last(). |
_markedNode | back to summary |
---|---|
protected int _markedNode Store node in call to setMark(). |
_position | back to summary |
---|---|
protected int _position Value of position() in this iterator. Incremented in returnNode(). |
_startNode | back to summary |
---|---|
protected int _startNode Store node in call to setStartNode(). |
NodeIteratorBase | back to summary |
---|---|
public NodeIteratorBase() |
cloneIterator | back to summary |
---|---|
public NodeIterator cloneIterator() Implements com. 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 | back to summary |
---|---|
public int getLast() Implements com. Default implementation of getLast(). Stores current position and current node, resets the iterator, counts all nodes and restores iterator to original state. |
getPosition | back to summary |
---|---|
public int getPosition() Implements com. Returns the position() in this iterator. |
includeSelf | back to summary |
---|---|
public NodeIterator includeSelf() Setter for _includeSelf flag. |
isReverse | back to summary |
---|---|
public boolean isReverse() Implements com. Indicates if position in this iterator is computed in reverse document order. Note that nodes are always returned in document order. |
reset | back to summary |
---|---|
public NodeIterator reset() Implements com. Reset this iterator using state from last call to setStartNode(). |
resetPosition | back to summary |
---|---|
protected final NodeIterator resetPosition() Reset the position in this iterator. |
returnNode | back to summary |
---|---|
protected final int returnNode(final int node) Utility method that increments position and returns its argument. |
setRestartable | back to summary |
---|---|
public void setRestartable(boolean isRestartable) Implements com. Setter for _isRestartable flag. |
setStartNode | back to summary |
---|---|
public abstract NodeIterator setStartNode(int node) Redeclares com. 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. |