Class DTMDefaultBaseIterators.PrecedingIterator

    • Field Detail

      • _maxAncestors

        private final int _maxAncestors
        The max ancestors, but it can grow...
        See Also:
        Constant Field Values
      • _stack

        protected int[] _stack
        The stack of start node + ancestors up to the root of the tree, which we must avoid.
      • _sp

        protected int _sp
        (not sure yet... -sb)
      • _oldsp

        protected int _oldsp
        (not sure yet... -sb)
    • Constructor Detail

      • PrecedingIterator

        public PrecedingIterator()
    • Method Detail

      • cloneIterator

        public DTMAxisIterator 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.
        Specified by:
        cloneIterator in interface DTMAxisIterator
        Overrides:
        cloneIterator in class DTMAxisIteratorBase
        Returns:
        a deep copy of this iterator.
      • setStartNode

        public void setStartNode​(int node)
        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.
      • next

        public int next()
        Get the next node in the iteration.
        Returns:
        The next node handle in the iteration, or END.