| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xml.dtm.ref.DTMAxisIteratorBase
org.apache.xalan.xsltc.dom.CurrentNodeListIterator
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.
| Field Summary | |
|---|---|
| private  int | _currentIndexIndex in _nodes of the next node to filter. | 
| private  int | _currentNodeThe current node in the stylesheet at the time of evaluation. | 
| private  boolean | _docOrderA flag indicating if nodes are returned in document order. | 
| private  CurrentNodeListFilter | _filterA reference to a filter object. | 
| private  IntegerArray | _nodesAn integer array to store nodes from source iterator. | 
| private  DTMAxisIterator | _sourceThe source for this iterator. | 
| private  AbstractTranslet | _transletA reference to the translet. | 
| Fields inherited from class org.apache.xml.dtm.ref.DTMAxisIteratorBase | 
|---|
| _includeSelf, _isRestartable, _last, _markedNode, _position, _startNode | 
| Fields inherited from interface org.apache.xml.dtm.DTMAxisIterator | 
|---|
| END | 
| Constructor Summary | |
|---|---|
| CurrentNodeListIterator(DTMAxisIterator source,
                                               boolean docOrder,
                                               CurrentNodeListFilter filter,
                                               int currentNode,
                                               AbstractTranslet translet) | |
| CurrentNodeListIterator(DTMAxisIterator source,
                                               CurrentNodeListFilter filter,
                                               int currentNode,
                                               AbstractTranslet translet) | |
| Method Summary | |
|---|---|
|  DTMAxisIterator | cloneIterator()Returns a deep copy of this iterator. | 
| private  int | computePositionOfLast() | 
|  DTMAxisIterator | forceNaturalOrder() | 
|  int | getLast()Returns the position of the last node within the iteration, as defined by XPath. | 
|  void | gotoMark()Restores the current node remembered by setMark(). | 
|  boolean | isReverse() | 
|  int | next()Get the next node in the iteration. | 
|  DTMAxisIterator | reset()Resets the iterator to the last start node. | 
|  void | setMark()Remembers the current node for the next call to gotoMark(). | 
|  void | setRestartable(boolean isRestartable)Set if restartable. | 
|  DTMAxisIterator | setStartNode(int node)Set start to END should 'close' the iterator, i.e. | 
| Methods inherited from class org.apache.xml.dtm.ref.DTMAxisIteratorBase | 
|---|
| getAxis, getNodeByPosition, getPosition, getStartNode, includeSelf, isDocOrdered, resetPosition, returnNode | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private boolean _docOrder
private DTMAxisIterator _source
private final CurrentNodeListFilter _filter
private IntegerArray _nodes
private int _currentIndex
private final int _currentNode
private AbstractTranslet _translet
| Constructor Detail | 
|---|
public CurrentNodeListIterator(DTMAxisIterator source,
                               CurrentNodeListFilter filter,
                               int currentNode,
                               AbstractTranslet translet)
public CurrentNodeListIterator(DTMAxisIterator source,
                               boolean docOrder,
                               CurrentNodeListFilter filter,
                               int currentNode,
                               AbstractTranslet translet)
| Method Detail | 
|---|
public DTMAxisIterator forceNaturalOrder()
public void setRestartable(boolean isRestartable)
DTMAxisIterator
setRestartable in interface DTMAxisIteratorsetRestartable in class DTMAxisIteratorBasepublic boolean isReverse()
isReverse in interface DTMAxisIteratorisReverse in class DTMAxisIteratorBasepublic DTMAxisIterator cloneIterator()
DTMAxisIteratorBase
cloneIterator in interface DTMAxisIteratorcloneIterator in class DTMAxisIteratorBasepublic DTMAxisIterator reset()
DTMAxisIterator
reset in interface DTMAxisIteratorreset in class DTMAxisIteratorBasepublic int next()
DTMAxisIterator
public DTMAxisIterator setStartNode(int node)
DTMAxisIterator
node - Sets the root of the iteration.
public int getLast()
DTMAxisIteratorBase
getLast in interface DTMAxisIteratorgetLast in class DTMAxisIteratorBasepublic void setMark()
DTMAxisIterator
public void gotoMark()
DTMAxisIterator
private int computePositionOfLast()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||