Class DupFilterIterator

  • All Implemented Interfaces:
    java.lang.Cloneable, DTMAxisIterator

    public final class DupFilterIterator
    extends DTMAxisIteratorBase
    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
    • Constructor Detail

    • Method Detail

      • setStartNode

        public DTMAxisIterator setStartNode​(int node)
        Set the start node for this iterator
        Parameters:
        node - The start node
        Returns:
        A reference to this node iterator
      • next

        public int next()
        Description copied from interface: DTMAxisIterator
        Get the next node in the iteration.
        Returns:
        The next node handle in the iteration, or END.
      • setMark

        public void setMark()
        Description copied from interface: DTMAxisIterator
        Remembers the current node for the next call to gotoMark().
      • gotoMark

        public void gotoMark()
        Description copied from interface: DTMAxisIterator
        Restores the current node remembered by setMark().