F - type of the return value of the function
getResultOfCurrentNode()public interface Visitor<F>
Usage of the visitor is done via TreeNode.performVisitor(Visitor).
| Modifier and Type | Method and Description |
|---|---|
F |
getResultOfCurrentNode()
Returns the value that was calculated during
visit(TreeNode). |
Visitor<F> |
getVisitorForNextChild()
Returns a visitor for the next child.
|
void |
putResultOfChild(F input)
Inserts the result of the child of current node, so that the current
visitor can calculate its own value from it.
|
void |
visit(TreeNode currentNode)
Performs some kind of computation on the given
currentNode. |
F getResultOfCurrentNode() throws WrongAccessStructureException
visit(TreeNode).WrongAccessStructureException - if something is wrong with the access structure being traversedVisitor<F> getVisitorForNextChild() throws WrongAccessStructureException
WrongAccessStructureException - if something is wrong with the access structure being traversedvoid putResultOfChild(F input)
input - the result of visiting the child of the node currently being visitedvoid visit(TreeNode currentNode) throws WrongAccessStructureException
currentNode.currentNode - node of the threshold tree to visitWrongAccessStructureException - if something is wrong with the access structure being traversed