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 allITreeNodeobjects and adds them to aCollectionobject with all descendant
-
-
Constructor Summary
Constructors Constructor Description MaxIndexFinderTreeNodeVisitor()Instantiates a newMergeTreeNodesVisitorobject
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanisGreater(K id)Checks if the given id is greater than the currentmaxIndexvoidvisit(T treeNode)
-
-
-
Constructor Detail
-
MaxIndexFinderTreeNodeVisitor
public MaxIndexFinderTreeNodeVisitor()
Instantiates a newMergeTreeNodesVisitorobject
-
-
Method Detail
-
visit
public void visit(T treeNode)
- Specified by:
visitin 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
maxIndexotherwise false
-
-