Package 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
,Serializable
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:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvisit
(ASTFunNode node, Object data) Ensures that functions will be correct for the give Jep instance.Ensures that operators are correct for the given Jep instance.visit
(ASTVarNode node, Object data) Uses the name of the variable rather than the variable reference to create the nodeMethods inherited from class com.singularsys.jep.walkers.DeepCopyVisitor
deepCopy, visit
Methods inherited from class com.singularsys.jep.walkers.DoNothingVisitor
childrenHaveChanged, copyChildrenIfNeeded, getFunctionTable, getLightWeightInstance, getNodeFactory, getOperatorTable, getVariableTable, init, visit, visitChildren, visitNode
-
Constructor Details
-
ImportationVisitor
-
-
Method Details
-
visit
Uses the name of the variable rather than the variable reference to create the node- Specified by:
visit
in interfaceParserVisitor
- Overrides:
visit
in classDeepCopyVisitor
- Throws:
ParseException
-
visit
Ensures that functions will be correct for the give Jep instance. Necessary for functions which implementJepComponent
.- Specified by:
visit
in interfaceParserVisitor
- Overrides:
visit
in classDeepCopyVisitor
- Throws:
JepException
- Since:
- 4.0
-
visit
Ensures that operators are correct for the given Jep instance. Necessary for functions which implementJepComponent
.- Specified by:
visit
in interfaceParserVisitor
- Overrides:
visit
in classDeepCopyVisitor
- Throws:
JepException
- Since:
- 4.0
-