Class DTMDefaultBaseIterators.AncestorIterator

All Implemented Interfaces:
Cloneable, DTMAxisIterator
Enclosing class:
DTMDefaultBaseIterators

public class DTMDefaultBaseIterators.AncestorIterator extends DTMDefaultBaseIterators.InternalAxisIteratorBase
Iterator that returns the ancestors of a given node in document order. (NOTE! This was changed from the XSLTC code!)
  • Constructor Details

    • AncestorIterator

      public AncestorIterator()
  • Method Details

    • isReverse

      public final boolean isReverse()
      Specified by:
      isReverse in interface DTMAxisIterator
      Overrides:
      isReverse in class DTMAxisIteratorBase
      Returns:
      true if this iterator has a reversed axis, else false
    • 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.
    • reset

      public void reset()
      Resets the iterator to the last start node.
      Specified by:
      reset in interface DTMAxisIterator
      Overrides:
      reset in class DTMAxisIteratorBase
    • next

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