Class AbsoluteIterator

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

    public final class AbsoluteIterator
    extends DTMAxisIteratorBase
    Absolute iterators ignore the node that is passed to setStartNode(). Instead, they always start from the root node. The node passed to setStartNode() is not totally useless, though. It is needed to obtain the DOM mask, i.e. the index into the MultiDOM table that corresponds to the DOM "owning" the node. The DOM mask is cached, so successive calls to setStartNode() passing nodes from other DOMs will have no effect (i.e. this iterator cannot migrate between DOMs).
    Author:
    Jacek Ambroziak, Santiago Pericas-Geertsen
    • Constructor Detail

    • Method Detail

      • setStartNode

        public DTMAxisIterator setStartNode​(int node)
        Description copied from interface: DTMAxisIterator
        Set start to END should 'close' the iterator, i.e. subsequent call to next() should return END.
        Parameters:
        node - Sets the root of the iteration.
        Returns:
        A DTMAxisIterator set to the start of the iteration.
      • 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().