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

public final Class NthIterator

extends DTMAxisIteratorBase
Class Inheritance
Imports
com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary, com.sun.org.apache.xml.internal.dtm.DTMAxisIterator, com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase

Authors
Jacek Ambroziak, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
private final int
private boolean
private DTMAxisIterator
Inherited from com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase:
_includeSelf_isRestartable_last_markedNode_startNode

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.getLast.

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.getLast.

Returns the position of the last node within the iteration, as defined by XPath.

public int
public void
gotoMark()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.gotoMark.

Restores the current node remembered by setMark().

public int
next()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.next.

Get the next node in the iteration.

public DTMAxisIterator
public void
setMark()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setMark.

Remembers the current node for the next call to gotoMark().

public void
public DTMAxisIterator
setStartNode(final int node)

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setStartNode.

Set start to END should 'close' the iterator, i.e. subsequent call to next() should return END.

Inherited from com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase:
getAxisgetNodeByPositiongetStartNodeincludeSelfisDocOrderedisReverseresetPositionreturnNode

Field Detail

_positionback to summary
private final int _position

Hides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase._position.

_readyback to summary
private boolean _ready
_sourceback to summary
private DTMAxisIterator _source

Constructor Detail

NthIteratorback to summary
public NthIterator(DTMAxisIterator source, int n)

Method Detail

cloneIteratorback to summary
public DTMAxisIterator cloneIterator()

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.cloneIterator.

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.cloneIterator.

Doc from com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.cloneIterator.

Returns a deep copy of this iterator. Cloned iterators may not be restartable. The iterator being cloned may or may not become non-restartable as a side effect of this operation.

getLastback to summary
public int getLast()

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.getLast.

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.getLast.

Doc from com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.getLast.

Returns the position of the last node within the iteration, as defined by XPath. In a forward iterator, I believe this equals the number of nodes which this iterator will yield. In a reverse iterator, I believe it should return 1 (since the "last" is the first produced.) This may be an expensive operation when called the first time, since it may have to iterate through a large part of the document to produce its answer.

getPositionback to summary
public int getPosition()

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.getPosition.

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.getPosition.

gotoMarkback to summary
public void gotoMark()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.gotoMark.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.gotoMark.

Restores the current node remembered by setMark().

nextback to summary
public int next()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.next.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.next.

Get the next node in the iteration.

resetback to summary
public DTMAxisIterator reset()

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.reset.

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.reset.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.reset.

Resets the iterator to the last start node.

setMarkback to summary
public void setMark()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setMark.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setMark.

Remembers the current node for the next call to gotoMark().

setRestartableback to summary
public void setRestartable(boolean isRestartable)

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.setRestartable.

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setRestartable.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setRestartable.

Set if restartable.

setStartNodeback to summary
public DTMAxisIterator setStartNode(final int node)

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setStartNode.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setStartNode.

Set start to END should 'close' the iterator, i.e. subsequent call to next() should return END.