com.singularsys.jep.walkers

## Class ImportationVisitor

- java.lang.Object
- - com.singularsys.jep.walkers.DoNothingVisitor
  - - com.singularsys.jep.walkers.DeepCopyVisitor
    - - com.singularsys.jep.walkers.ImportationVisitor

- All Implemented Interfaces:
    JepComponent, ParserVisitor, java.io.Serializable

      public class ImportationVisitor
      extends DeepCopyVisitor

  Imports an expression from one Jep instance into another. This class is quicker than using a SerializableExpression but cannot handle such large equations.

         Jep sourceJep = ...;
         Jep destJep = ...;
         ImportationVisitor iv = new ImportationVisitor(destJep);
         Node node = sourceJep.parse("x^2-y^2");
         Node imported = iv.deepCopy(node);

  Since:
    Jep 3.5
  Author:
    Richard Morris
  See Also:
    `SerializableExpression`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.singularsys.jep.walkers.DoNothingVisitor

      `ft, jep, nf, ot, vt`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImportationVisitor(Jep j)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `visit(ASTVarNode node, java.lang.Object data)` Uses the name of the variable rather than the variable reference to create the node

    - ### Methods inherited from class com.singularsys.jep.walkers.DeepCopyVisitor

      `deepCopy, visit, visit, visit`

    - ### Methods inherited from class com.singularsys.jep.walkers.DoNothingVisitor

      `childrenHaveChanged, copyChildrenIfNeeded, getFunctionTable, getLightWeightInstance, getNodeFactory, getOperatorTable, getVariableTable, init, visit, visitChildren, visitNode`

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

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

- - ### Constructor Detail

    - #### ImportationVisitor

          public ImportationVisitor(Jep j)

  - ### Method Detail

    - #### visit

          public java.lang.Object visit(ASTVarNode node,
                                        java.lang.Object data)
                                 throws ParseException

      Uses the name of the variable rather than the variable reference to create the node
      Specified by:
        `visit` in interface `ParserVisitor`
      Overrides:
        `visit` in class `DeepCopyVisitor`
      Throws:
        `ParseException`

Copyright © 2018 Singular Systems http://www.singularsys.com/jep