Interface DepthFirstIterableTree<D,​N extends TreeNode<D,​?>>

  • Type Parameters:
    D - is the type of the data inside the tree
    N - is the type of the tree nodes.
    All Superinterfaces:
    Iterable<N>, Tree<D,​N>
    All Known Implementing Classes:
    AbstractTree, LinkedTree

    public interface DepthFirstIterableTree<D,​N extends TreeNode<D,​?>>
    extends Tree<D,​N>
    This is the generic implementation of a tree service that permits to iterator with a depth-first approach.

    This is the public interface for a tree which is independent of the tree implementation.

    Since:
    13.0
    Version:
    17.0 2020-01-04 14:41:41
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathtree
    • Method Detail

      • depthFirstIterator

        @Pure
        Iterator<N> depthFirstIterator​(DepthFirstNodeOrder nodeOrder)
        Description copied from interface: Tree
        Replies a depth-first iterator on nodes.
        Specified by:
        depthFirstIterator in interface Tree<D,​N extends TreeNode<D,​?>>
        Parameters:
        nodeOrder - indicates how the data are treated by the iterator.
        Returns:
        a depth first iterator on nodes
      • depthFirstIterator

        @Pure
        Iterator<N> depthFirstIterator​(int infixPosition)
        Replies the infixes depth first iterator on the tree.
        Parameters:
        infixPosition - is the index at which the parent will be treated according to its child set.
        Returns:
        the iterator on nodes
        See Also:
        InfixDepthFirstTreeIterator
      • depthFirstIterator

        @Pure
        Iterator<N> depthFirstIterator()
        Description copied from interface: Tree
        Replies a depth-first iterator on nodes.
        Specified by:
        depthFirstIterator in interface Tree<D,​N extends TreeNode<D,​?>>
        Returns:
        a depth-first iterator.
      • dataDepthFirstIterator

        @Pure
        Iterator<D> dataDepthFirstIterator()
        Description copied from interface: Tree
        Replies a prefixed depth first iterator on the tree.
        Specified by:
        dataDepthFirstIterator in interface Tree<D,​N extends TreeNode<D,​?>>
        Returns:
        a prefixed depth first iterator on data.
      • toDepthFirstIterable

        @Pure
        Iterable<N> toDepthFirstIterable()
        Replies the depth first iterator on the tree.
        Returns:
        the iterator on nodes
      • toDepthFirstIterable

        @Pure
        Iterable<N> toDepthFirstIterable​(DepthFirstNodeOrder nodeOrder)
        Replies the depth first iterator on the tree.
        Parameters:
        nodeOrder - is the order in which the parent node will be treated in comparison to its children.
        Returns:
        the iterator on nodes
      • toDepthFirstIterable

        @Pure
        Iterable<N> toDepthFirstIterable​(int infixPosition)
        Replies the infixed depth first iterator on the tree.
        Parameters:
        infixPosition - is the index at which the parent will be treated according to its child set.
        Returns:
        the iterator on nodes
        See Also:
        InfixDepthFirstTreeIterator
      • toDataDepthFirstIterable

        @Pure
        Iterable<D> toDataDepthFirstIterable()
        Replies the depth first iterator on the tree.
        Returns:
        the iterator on user data
      • toDataDepthFirstIterable

        @Pure
        Iterable<D> toDataDepthFirstIterable​(DepthFirstNodeOrder nodeOrder)
        Replies the depth first iterator on the tree.
        Parameters:
        nodeOrder - is the order in which the parent node will be treated in comparison to its children.
        Returns:
        the iterator on user data
      • toDataDepthFirstIterable

        @Pure
        Iterable<D> toDataDepthFirstIterable​(int infixPosition)
        Replies the infixed depth first iterator on the tree.
        Parameters:
        infixPosition - is the index at which the parent will be treated according to its child set.
        Returns:
        the iterator on user data
        See Also:
        InfixDepthFirstTreeIterator