MCPcopy Create free account
hub / github.com/Aghajari/MathParser / ExpValue

Class ExpValue

MathParser/src/com/aghajari/math/MathParser.java:978–989  ·  view source on GitHub ↗

A new ExpValue means parser once tried to calculate ExpValue#expression but something went wrong! (usually a variable is missed), So Parser tries to store the expression in a ExpValue and calculate it again when needed by MathParser#calculate and will set fromExpValue true, i

Source from the content-addressed store, hash-verified

976 * that's why we use {@link ExpValue}, to make sure there won't be any dynamic variable.
977 */
978 private static class ExpValue {
979 final String expression, original;
980
981 ExpValue(String expression, String original) {
982 this.expression = expression;
983 this.original = original;
984 }
985
986 public double calculate(MathParser parser) throws MathParserException {
987 return parser.calculate(expression, original, true);
988 }
989 }
990
991 /**
992 * A simple parser to parse a linear expression,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected