Module gen.tree

Class MergeTreeNodesVisitor<T,​K>

  • Type Parameters:
    T - the generic type of the value
    K - the generic type of the id of the node
    All Implemented Interfaces:
    io.github.astrapi69.design.pattern.visitor.Visitor<BaseTreeNode<T,​K>>

    public class MergeTreeNodesVisitor<T,​K>
    extends java.lang.Object
    implements io.github.astrapi69.design.pattern.visitor.Visitor<BaseTreeNode<T,​K>>
    This visitor visits all BaseTreeNode objects and merges all nodes to the given BaseTreeNode object. This means only the given BaseTreeNode object will be changed and the BaseTreeNode object that implements this visitor will be not changed
    • Method Detail

      • visit

        public void visit​(BaseTreeNode<T,​K> treeNode)
        Specified by:
        visit in interface io.github.astrapi69.design.pattern.visitor.Visitor<T>