org.apache.xalan.xsltc.dom
Class NthIterator
- Cloneable, DTMAxisIterator
public final class NthIterator
- Jacek Ambroziak
- Morten Jorgensen
cloneIterator , getAxis , getLast , getNodeByPosition , getPosition , getStartNode , includeSelf , isDocOrdered , isReverse , reset , setRestartable |
cloneIterator
public DTMAxisIterator 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.
- cloneIterator in interface DTMAxisIterator
- cloneIterator in interface DTMAxisIteratorBase
- a deep copy of this iterator.
getLast
public int 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.
- getLast in interface DTMAxisIterator
- getLast in interface DTMAxisIteratorBase
- The number of nodes in this iterator (forward) or 1 (reverse).
getPosition
public int getPosition()
- getPosition in interface DTMAxisIterator
- getPosition in interface DTMAxisIteratorBase
- The position of the current node within the set, as defined by
XPath. Note that this is one-based, not zero-based.
Copyright B) 2004 Apache XML Project. All Rights Reserved.