Class DoNothingVisitor

    • Field Detail

      • jep

        protected Jep jep
        Jep instance
      • nf

        protected NodeFactory nf
        Convenience reference to the NodeFactory
      • vt

        protected VariableTable vt
        Convenience reference to the VariableTable
      • ft

        protected FunctionTable ft
        Convenience reference to the FunctionTable
      • ot

        protected OperatorTableI ot
        Convenience reference to the OperatorTableI
    • Constructor Detail

      • DoNothingVisitor

        public DoNothingVisitor()
        Constructor to use with JepComponent mechanism, init method must be called.
      • DoNothingVisitor

        public DoNothingVisitor​(Jep j)
    • Method Detail

      • init

        public void init​(Jep j)
        Description copied from interface: JepComponent
        Initialize the component. This methods is called whenever a component is added to Jep. Hence it allows components to keep track of the other components they may rely on.
        Specified by:
        init in interface JepComponent
        Parameters:
        j - the current Jep instance
      • visitNode

        public Node visitNode​(Node node,
                              java.lang.Object data)
                       throws JepException
        Used to recursively visit the children of a node.
        Parameters:
        node - Node to visit
        data - user specified data
        Returns:
        a Node with the modified tree
        Throws:
        JepException
      • visitChildren

        protected Node[] visitChildren​(Node node,
                                       java.lang.Object data)
                                throws JepException
        Gets the result of visiting children of a array of nodes.
        Parameters:
        node - current node being visited
        data - user specified data
        Returns:
        an array of results from visiting each child of the node.
        Throws:
        JepException
      • copyChildrenIfNeeded

        protected Node copyChildrenIfNeeded​(Node node,
                                            Node[] children)
                                     throws JepException
        Sets the children of a node if they have changed for it current children.
        Throws:
        JepException
      • childrenHaveChanged

        protected boolean childrenHaveChanged​(Node node,
                                              Node[] children)
        Tests if the children of a node have changed
        Parameters:
        node - the original node
        children - the new set of children.
        Returns:
        true if the children have changed, false otherwise