Interface BroadFirstIterableTree<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 BroadFirstIterableTree<D,​N extends TreeNode<D,​?>>
    extends Tree<D,​N>
    This is the generic implementation of a tree service that permits to iterate with a broad-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

      • broadFirstIterator

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

        @Pure
        Iterator<D> dataBroadFirstIterator()
        Description copied from interface: Tree
        Replies the broad-first iterator on the tree.
        Specified by:
        dataBroadFirstIterator in interface Tree<D,​N extends TreeNode<D,​?>>
        Returns:
        the iterator on user data.
      • toBroadFirstIterable

        @Pure
        Iterable<N> toBroadFirstIterable()
        Replies the broad-first iterator on the tree.
        Returns:
        the iterator on nodes.
      • toDataBroadFirstIterable

        @Pure
        Iterable<D> toDataBroadFirstIterable()
        Replies the broad-first iterator on the tree.
        Returns:
        the iterator on user data.