org.apache.xalan.xsltc.dom
Class CurrentNodeListIterator
- Cloneable, DTMAxisIterator
public final class CurrentNodeListIterator
Iterators of this kind use a CurrentNodeListFilter to filter a subset of
nodes from a source iterator. For each node from the source, the boolean
method CurrentNodeListFilter.test() is called.
All nodes from the source are read into an array upon calling setStartNode()
(this is needed to determine the value of last, a parameter to
CurrentNodeListFilter.test()). The method getLast() returns the last element
after applying the filter.
- Jacek Ambroziak
- Santiago Pericas-Geertsen
- Morten Jorgensen
cloneIterator , getAxis , getLast , getNodeByPosition , getPosition , getStartNode , includeSelf , isDocOrdered , isReverse , reset , setRestartable |
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).
Copyright B) 2004 Apache XML Project. All Rights Reserved.