Class BroadFirstTreeIterator<N extends TreeNode<?,​N>>

    • Constructor Detail

      • BroadFirstTreeIterator

        public BroadFirstTreeIterator​(Tree<?,​N> tree)
        Create an iterator on the given tree.
        Parameters:
        tree - is the tree to iterate.
      • BroadFirstTreeIterator

        public BroadFirstTreeIterator​(Tree<?,​N> tree,
                                      NodeSelector<N> selector1)
        Create an iterator on the given tree.
        Parameters:
        tree - is the tree to iterate.
        selector1 - permits to filter the node repliable by this iterator.
      • BroadFirstTreeIterator

        public BroadFirstTreeIterator​(N node)
        Create an iterator on the given node.
        Parameters:
        node - is the node to iterate.
      • BroadFirstTreeIterator

        public BroadFirstTreeIterator​(N node,
                                      NodeSelector<N> selector1)
        Create an iterator on the given node.
        Parameters:
        node - is the node to iterate.
        selector1 - permits to filter the node repliable by this iterator.
    • Method Detail

      • toTraversableChild

        @Pure
        protected N toTraversableChild​(N parent,
                                       N child,
                                       int childIndex,
                                       int notNullChildIndex)
        Description copied from class: AbstractBroadFirstTreeIterator
        Replies an object to type N which is corresponding to the given child node retreived from the given parent node.
        Specified by:
        toTraversableChild in class AbstractBroadFirstTreeIterator<N extends TreeNode<?,​N>,​N extends TreeNode<?,​N>>
        Parameters:
        parent - is the node from which the child node was retreived.
        child - is the child node to test.
        childIndex - is the position of the child node in its parent. childIndex is always greater or equal to notNullChildIndex.
        notNullChildIndex - is the position of the child node in the list of the not-null nodes of its parent. notNullChildIndex is always lower or equal to childIndex.
        Returns:
        the traversable node, or null if the node is not traversable.