org.apache.xml.dtm

## Interface DTMAxisIterator

- All Superinterfaces:
    java.lang.Cloneable
  All Known Implementing Classes:
    AbsoluteIterator, ArrayNodeListIterator, CachedNodeListIterator, ClonedNodeListIterator, CurrentNodeListIterator, DTMAxisIteratorBase, DTMDefaultBaseIterators.AncestorIterator, DTMDefaultBaseIterators.AttributeIterator, DTMDefaultBaseIterators.ChildrenIterator, DTMDefaultBaseIterators.DescendantIterator, DTMDefaultBaseIterators.FollowingIterator, DTMDefaultBaseIterators.FollowingSiblingIterator, DTMDefaultBaseIterators.InternalAxisIteratorBase, DTMDefaultBaseIterators.NamespaceAttributeIterator, DTMDefaultBaseIterators.NamespaceChildrenIterator, DTMDefaultBaseIterators.NamespaceIterator, DTMDefaultBaseIterators.NthDescendantIterator, DTMDefaultBaseIterators.ParentIterator, DTMDefaultBaseIterators.PrecedingIterator, DTMDefaultBaseIterators.PrecedingSiblingIterator, DTMDefaultBaseIterators.RootIterator, DTMDefaultBaseIterators.SingletonIterator, DTMDefaultBaseIterators.TypedAncestorIterator, DTMDefaultBaseIterators.TypedAttributeIterator, DTMDefaultBaseIterators.TypedChildrenIterator, DTMDefaultBaseIterators.TypedDescendantIterator, DTMDefaultBaseIterators.TypedFollowingIterator, DTMDefaultBaseIterators.TypedFollowingSiblingIterator, DTMDefaultBaseIterators.TypedNamespaceIterator, DTMDefaultBaseIterators.TypedPrecedingIterator, DTMDefaultBaseIterators.TypedPrecedingSiblingIterator, DTMDefaultBaseIterators.TypedRootIterator, DTMDefaultBaseIterators.TypedSingletonIterator, DupFilterIterator, EmptyIterator, FilteredStepIterator, FilterIterator, ForwardPositionIterator, KeyIndex, KeyIndex.KeyIndexIterator, MatchingIterator, MultiValuedNodeHeapIterator, NthIterator, SAX2DTM2.AncestorIterator, SAX2DTM2.AttributeIterator, SAX2DTM2.ChildrenIterator, SAX2DTM2.DescendantIterator, SAX2DTM2.FollowingIterator, SAX2DTM2.FollowingSiblingIterator, SAX2DTM2.ParentIterator, SAX2DTM2.PrecedingIterator, SAX2DTM2.PrecedingSiblingIterator, SAX2DTM2.TypedAncestorIterator, SAX2DTM2.TypedAttributeIterator, SAX2DTM2.TypedChildrenIterator, SAX2DTM2.TypedDescendantIterator, SAX2DTM2.TypedFollowingIterator, SAX2DTM2.TypedFollowingSiblingIterator, SAX2DTM2.TypedPrecedingIterator, SAX2DTM2.TypedPrecedingSiblingIterator, SAX2DTM2.TypedRootIterator, SAX2DTM2.TypedSingletonIterator, SAXImpl.NamespaceAttributeIterator, SAXImpl.NamespaceChildrenIterator, SAXImpl.NamespaceWildcardIterator, SAXImpl.TypedNamespaceIterator, SimpleResultTreeImpl.SimpleIterator, SimpleResultTreeImpl.SingletonIterator, SingletonIterator, SortingIterator, StepIterator, UnionIterator

      public interface DTMAxisIterator
      extends java.lang.Cloneable

  This class iterates over a single XPath Axis, and returns node handles.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `END` Specifies the end of the iteration, and is the same as DTM.NULL.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `DTMAxisIterator` | `cloneIterator()`
    `int` | `getLast()`
    `int` | `getNodeByPosition(int position)` Return the node at the given position.
    `int` | `getPosition()`
    `int` | `getStartNode()` Get start to END should 'close' the iterator, i.e. subsequent call to next() should return END.
    `void` | `gotoMark()` Restores the current node remembered by setMark().
    `boolean` | `isReverse()`
    `int` | `next()` Get the next node in the iteration.
    `DTMAxisIterator` | `reset()` Resets the iterator to the last start node.
    `void` | `setMark()` Remembers the current node for the next call to gotoMark().
    `void` | `setRestartable(boolean isRestartable)` Set if restartable.
    `DTMAxisIterator` | `setStartNode(int node)` Set start to END should 'close' the iterator, i.e. subsequent call to next() should return END.

- - ### Field Detail

    - #### END

          static final int END

      Specifies the end of the iteration, and is the same as DTM.NULL.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### next

          int next()

      Get the next node in the iteration.
      Returns:
        The next node handle in the iteration, or END.

    - #### reset

          DTMAxisIterator reset()

      Resets the iterator to the last start node.
      Returns:
        A DTMAxisIterator, which may or may not be the same as this iterator.

    - #### getLast

          int getLast()

      Returns:
        the number of nodes in this iterator. This may be an expensive operation when called the first time.

    - #### getPosition

          int getPosition()

      Returns:
        The position of the current node in the set, as defined by XPath.

    - #### setMark

          void setMark()

      Remembers the current node for the next call to gotoMark().

    - #### gotoMark

          void gotoMark()

      Restores the current node remembered by setMark().

    - #### setStartNode

          DTMAxisIterator 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.
      Returns:
        A DTMAxisIterator set to the start of the iteration.

    - #### getStartNode

          int getStartNode()

      Get start to END should 'close' the iterator, i.e. subsequent call to next() should return END.
      Returns:
        The root node of the iteration.

    - #### isReverse

          boolean isReverse()

      Returns:
        true if this iterator has a reversed axis, else false.

    - #### cloneIterator

          DTMAxisIterator cloneIterator()

      Returns:
        a deep copy of this iterator. The clone should not be reset from its current position.

    - #### setRestartable

          void setRestartable(boolean isRestartable)

      Set if restartable.

    - #### getNodeByPosition

          int getNodeByPosition(int position)

      Return the node at the given position.
      Parameters:
        `position` - The position
      Returns:
        The node at the given position.

Copyright © 2023 Apache XML Project. All Rights Reserved.