Package com.singularsys.jep.walkers
Class HookRemover
java.lang.Object
com.singularsys.jep.walkers.PostfixTreeWalker
com.singularsys.jep.walkers.HookRemover
Remove a specific hook from any node which has it on a tree
- Since:
- Jep 3.5
-
Constructor Summary
ConstructorsConstructorDescriptionRemove all hooks of all typesHookRemover(Node.HookKey hook) Remove all hooks with this hookHookRemover(Node.HookKey hook, Object value) Remove all hooks with this hook and value -
Method Summary
Modifier and TypeMethodDescriptionvoidremoveHooks(Node top) Remove hooks from this treeprotected voidvisit(ASTConstant node, int nchildren, int depth1) Visit a constant nodeprotected voidvisit(ASTFunNode node, int nchildren, int depth1) Visit a function nodeprotected voidVisit an operator nodeprotected voidvisit(ASTVarNode node, int nchildren, int depth1) Visit a variable nodeMethods inherited from class com.singularsys.jep.walkers.PostfixTreeWalker
suppressExaminingChildren, walk, walkSubEquations
-
Constructor Details
-
HookRemover
public HookRemover()Remove all hooks of all types -
HookRemover
Remove all hooks with this hook -
HookRemover
Remove all hooks with this hook and value- Parameters:
hook- to testvalue- compared withObject.equals(Object)
-
-
Method Details
-
removeHooks
Remove hooks from this tree- Parameters:
top- root note of the tree- Throws:
JepException
-
visit
Description copied from class:PostfixTreeWalkerVisit a function node- Specified by:
visitin classPostfixTreeWalker- Parameters:
node- the current node being visitednchildren- number of children of the nodedepth1- depth of tree, root node is depth 1.
-
visit
Description copied from class:PostfixTreeWalkerVisit an operator node- Specified by:
visitin classPostfixTreeWalker- Parameters:
node- the current node being visitednchildren- number of children of the nodedepth1- depth of tree, root node is depth 1.
-
visit
Description copied from class:PostfixTreeWalkerVisit a variable node- Specified by:
visitin classPostfixTreeWalker- Parameters:
node- the current node being visitednchildren- number of children of the nodedepth1- depth of tree, root node is depth 1.
-
visit
Description copied from class:PostfixTreeWalkerVisit a constant node- Specified by:
visitin classPostfixTreeWalker- Parameters:
node- the current node being visitednchildren- number of children of the nodedepth1- depth of tree, root node is depth 1.
-