Creates a new copy of this MathParser @return a shallow copy of this MathParser @noinspection MethodDoesntCallSuperMethod
()
| 842 | * @noinspection MethodDoesntCallSuperMethod |
| 843 | */ |
| 844 | public MathParser clone() { |
| 845 | MathParser newParser = MathParser.create(); |
| 846 | newParser.getVariables().addAll(variables); |
| 847 | newParser.getInnerVariables().addAll(innerVariables); |
| 848 | newParser.getFunctions().addAll(functions); |
| 849 | newParser.tmpGenerator.set(tmpGenerator.get()); |
| 850 | newParser.roundEnabled = roundEnabled; |
| 851 | newParser.roundScale = roundScale; |
| 852 | return newParser; |
| 853 | } |
| 854 | |
| 855 | /** |
| 856 | * Resets temp variables |
no test coverage detected