Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.dom

public abstract Class NodeIteratorBase

extends Object
implements NodeIterator
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xalan.internal.xsltc.NodeIterator, java.lang.Cloneable
Imports
com.sun.org.apache.xalan.internal.xsltc.NodeIterator, com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField 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().

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public NodeIterator
public int
getLast()

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.getLast.

Default implementation of getLast().

public int
getPosition()

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.getPosition.

Returns the position() in this iterator.

public NodeIterator
includeSelf()

Setter for _includeSelf flag.

public boolean
isReverse()

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.isReverse.

Indicates if position in this iterator is computed in reverse document order.

public NodeIterator
reset()

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.reset.

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

protected final NodeIterator
resetPosition()

Reset the position in this iterator.

protected final int
returnNode(final int node)

Utility method that increments position and returns its argument.

public void
setRestartable(boolean isRestartable)

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.setRestartable.

Setter for _isRestartable flag.

public abstract NodeIterator
setStartNode(int node)

Redeclares com.sun.org.apache.xalan.internal.xsltc.NodeIterator.setStartNode.

Initialize iterator using a node.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_includeSelfback to summary
protected boolean _includeSelf

Flag indicating if "self" should be returned.

_isRestartableback to summary
protected boolean _isRestartable

Flag indicating if iterator can be restarted.

_lastback to summary
protected int _last

Cached computed value of last().

_markedNodeback to summary
protected int _markedNode

Store node in call to setMark().

_positionback to summary
protected int _position

Value of position() in this iterator. Incremented in returnNode().

_startNodeback to summary
protected int _startNode

Store node in call to setStartNode().

Constructor Detail

NodeIteratorBaseback to summary
public NodeIteratorBase()

Method Detail

cloneIteratorback to summary
public NodeIterator cloneIterator()

Implements com.sun.org.apache.xalan.internal.xsltc.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.

getLastback to summary
public int getLast()

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.getLast.

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

getPositionback to summary
public int getPosition()

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.getPosition.

Returns the position() in this iterator.

includeSelfback to summary
public NodeIterator includeSelf()

Setter for _includeSelf flag.

isReverseback to summary
public boolean isReverse()

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.isReverse.

Indicates if position in this iterator is computed in reverse document order. Note that nodes are always returned in document order.

resetback to summary
public NodeIterator reset()

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.reset.

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

resetPositionback to summary
protected final NodeIterator resetPosition()

Reset the position in this iterator.

returnNodeback to summary
protected final int returnNode(final int node)

Utility method that increments position and returns its argument.

setRestartableback to summary
public void setRestartable(boolean isRestartable)

Implements com.sun.org.apache.xalan.internal.xsltc.NodeIterator.setRestartable.

Setter for _isRestartable flag.

setStartNodeback to summary
public abstract NodeIterator setStartNode(int node)

Redeclares com.sun.org.apache.xalan.internal.xsltc.NodeIterator.setStartNode.

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.