Class MaxIndexFinderTreeNodeVisitor<V,K,T extends IBaseTreeNode<V,K,T>>

java.lang.Object
io.github.astrapi69.gen.tree.visitor.MaxIndexFinderTreeNodeVisitor<V,K,T>
Type Parameters:
T - the generic type of the value
All Implemented Interfaces:
io.github.astrapi69.design.pattern.visitor.Visitor<T>

public abstract class MaxIndexFinderTreeNodeVisitor<V,K,T extends IBaseTreeNode<V,K,T>> extends Object implements io.github.astrapi69.design.pattern.visitor.Visitor<T>
This visitor visits all ITreeNode objects and adds them to a Collection object with all descendant
  • Constructor Details

    • MaxIndexFinderTreeNodeVisitor

      public MaxIndexFinderTreeNodeVisitor()
      Instantiates a new MergeTreeNodesVisitor object
  • Method Details

    • visit

      public void visit(T treeNode)
      Specified by:
      visit in interface io.github.astrapi69.design.pattern.visitor.Visitor<V>
    • isGreater

      public abstract boolean isGreater(K id)
      Checks if the given id is greater than the current maxIndex
      Parameters:
      id - the id to check
      Returns:
      true if the given id is greater than the current maxIndex otherwise false