Module gen.tree
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 java.lang.Object implements io.github.astrapi69.design.pattern.visitor.Visitor<T>
This visitor visits allITreeNode
objects and adds them to aCollection
object with all descendant
-
-
Constructor Summary
Constructors Constructor Description MaxIndexFinderTreeNodeVisitor()
Instantiates a newMergeTreeNodesVisitor
object
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
isGreater(K id)
Checks if the given id is greater than the currentmaxIndex
void
visit(T treeNode)
-
-
-
Constructor Detail
-
MaxIndexFinderTreeNodeVisitor
public MaxIndexFinderTreeNodeVisitor()
Instantiates a newMergeTreeNodesVisitor
object
-
-
Method Detail
-
visit
public void visit(T treeNode)
- Specified by:
visit
in interfaceio.github.astrapi69.design.pattern.visitor.Visitor<V>
-
isGreater
public abstract boolean isGreater(K id)
Checks if the given id is greater than the currentmaxIndex
- Parameters:
id
- the id to check- Returns:
- true if the given id is greater than the current
maxIndex
otherwise false
-
-