Package com.singularsys.jep.walkers

# Class HookRemover

java.lang.Object
com.singularsys.jep.walkers.PostfixTreeWalker
com.singularsys.jep.walkers.HookRemover

public class HookRemover extends PostfixTreeWalker
Remove a specific hook from any node which has it on a tree

Since:
  Jep 3.5

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HookRemover()`
  Remove all hooks of all types
  `HookRemover(Node.HookKey hook)`
  Remove all hooks with this hook
  `HookRemover(Node.HookKey hook, Object value)`
  Remove all hooks with this hook and value

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `removeHooks(Node top)`
  Remove hooks from this tree
  `protected void`
  `visit(ASTConstant node, int nchildren, int depth1)`
  Visit a constant node
  `protected void`
  `visit(ASTFunNode node, int nchildren, int depth1)`
  Visit a function node
  `protected void`
  `visit(ASTOpNode node, int nchildren, int depth1)`
  Visit an operator node
  `protected void`
  `visit(ASTVarNode node, int nchildren, int depth1)`
  Visit a variable node

  ### Methods inherited from class com.singularsys.jep.walkers.PostfixTreeWalker

  `suppressExaminingChildren, walk, walkSubEquations`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HookRemover

    public HookRemover()
    Remove all hooks of all types

  - ### HookRemover

    public HookRemover(Node.HookKey hook)
    Remove all hooks with this hook

  - ### HookRemover

    public HookRemover(Node.HookKey hook, Object value)
    Remove all hooks with this hook and value
    Parameters:
      `hook` - to test
      `value` - compared with `Object.equals(Object)`

- ## Method Details

  - ### removeHooks

    public void removeHooks(Node top) throws JepException
    Remove hooks from this tree
    Parameters:
      `top` - root note of the tree
    Throws:
      `JepException`

  - ### visit

    protected void visit(ASTFunNode node, int nchildren, int depth1)
    Description copied from class: `PostfixTreeWalker`
    Visit a function node
    Specified by:
      `visit` in class `PostfixTreeWalker`
    Parameters:
      `node` - the current node being visited
      `nchildren` - number of children of the node
      `depth1` - depth of tree, root node is depth 1.

  - ### visit

    protected void visit(ASTOpNode node, int nchildren, int depth1)
    Description copied from class: `PostfixTreeWalker`
    Visit an operator node
    Specified by:
      `visit` in class `PostfixTreeWalker`
    Parameters:
      `node` - the current node being visited
      `nchildren` - number of children of the node
      `depth1` - depth of tree, root node is depth 1.

  - ### visit

    protected void visit(ASTVarNode node, int nchildren, int depth1)
    Description copied from class: `PostfixTreeWalker`
    Visit a variable node
    Specified by:
      `visit` in class `PostfixTreeWalker`
    Parameters:
      `node` - the current node being visited
      `nchildren` - number of children of the node
      `depth1` - depth of tree, root node is depth 1.

  - ### visit

    protected void visit(ASTConstant node, int nchildren, int depth1)
    Description copied from class: `PostfixTreeWalker`
    Visit a constant node
    Specified by:
      `visit` in class `PostfixTreeWalker`
    Parameters:
      `node` - the current node being visited
      `nchildren` - number of children of the node
      `depth1` - depth of tree, root node is depth 1.