Top Description Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.dom

public final Class DupFilterIterator

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

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().
Author
G. Todd Miller

Field Summary

Modifier and TypeField and Description
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.

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public DTMAxisIterator
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

Returns:

A reference to this node iterator
setStartNode
(int
The start node
node
)

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

Set the start node for this iterator

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

Field Detail

_currentback to summary
private int _current

Index in _nodes array to current node.

_lastNextback to summary
private int _lastNext

Last value returned by next().

_markedLastNextback to summary
private int _markedLastNext

Temporary variable to store _lastNext.

_nodesback to summary
private IntegerArray _nodes

Array to cache all nodes from source.

_nodesSizeback to summary
private int _nodesSize

Cardinality of _nodes array.

_sourceback to summary
private DTMAxisIterator _source

Reference to source iterator.

Constructor Detail

DupFilterIteratorback to summary
public DupFilterIterator(DTMAxisIterator source)

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.

Returns:DTMAxisIterator

a deep copy of this iterator.

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.

Returns:int

The next node handle in the iteration, or END.

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.

Returns:DTMAxisIterator

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

A DTMAxisIterator which has been reset to the start node, which may or may not be the same as this iterator.

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(int node)

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

Set the start node for this iterator

Parameters
node:int

The start node

Returns:DTMAxisIterator

A reference to this node iterator