|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.dtm.ref.DTMAxisIteratorBase org.apache.xalan.xsltc.dom.DupFilterIterator
public final class DupFilterIterator
Removes duplicates and sorts a source iterator. The nodes from the source are collected in an array upon calling setStartNode(). This array is later sorted and duplicates are ignored in next().
Field Summary | |
---|---|
private int |
_current
Index in _nodes array to current node. |
private int |
_lastNext
Last value returned by next(). |
private int |
_markedLastNext
Temporary variable to store _lastNext. |
private IntegerArray |
_nodes
Array to cache all nodes from source. |
private int |
_nodesSize
Cardinality of _nodes array. |
private DTMAxisIterator |
_source
Reference to source iterator. |
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 | |
---|---|
DupFilterIterator(DTMAxisIterator source)
|
Method Summary | |
---|---|
DTMAxisIterator |
cloneIterator()
Returns a deep copy of this iterator. |
void |
gotoMark()
Restores the current node remembered by setMark(). |
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 the start node for this iterator |
Methods inherited from class org.apache.xml.dtm.ref.DTMAxisIteratorBase |
---|
getAxis, getLast, getNodeByPosition, getPosition, getStartNode, includeSelf, isDocOrdered, isReverse, resetPosition, returnNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private DTMAxisIterator _source
private IntegerArray _nodes
private int _current
private int _nodesSize
private int _lastNext
private int _markedLastNext
Constructor Detail |
---|
public DupFilterIterator(DTMAxisIterator source)
Method Detail |
---|
public DTMAxisIterator setStartNode(int node)
node
- The start node
public int next()
DTMAxisIterator
public DTMAxisIterator cloneIterator()
DTMAxisIteratorBase
cloneIterator
in interface DTMAxisIterator
cloneIterator
in class DTMAxisIteratorBase
public void setRestartable(boolean isRestartable)
DTMAxisIterator
setRestartable
in interface DTMAxisIterator
setRestartable
in class DTMAxisIteratorBase
public void setMark()
DTMAxisIterator
public void gotoMark()
DTMAxisIterator
public DTMAxisIterator reset()
DTMAxisIterator
reset
in interface DTMAxisIterator
reset
in class DTMAxisIteratorBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |