public final class MmuCalculator
extends java.lang.Object
MmuCalculator
implements an expression calculator.Modifier and Type | Method and Description |
---|---|
static java.lang.Boolean |
eval(MmuConditionAtom atom,
Function<IntegerVariable,java.math.BigInteger> getValue) |
static java.lang.Boolean |
eval(MmuCondition cond,
Function<IntegerVariable,java.math.BigInteger> getValue) |
static java.math.BigInteger |
eval(MmuExpression expr,
Function<IntegerVariable,java.math.BigInteger> getValue,
boolean check)
Evaluates the expression.
|
public static java.math.BigInteger eval(MmuExpression expr, Function<IntegerVariable,java.math.BigInteger> getValue, boolean check)
The empty expression is evaluated to zero.
expr
- the expression to be calculated.getValue
- the function that returns a variable's value.check
- the flag indicating whether to fail if no value is found for some variable.public static java.lang.Boolean eval(MmuConditionAtom atom, Function<IntegerVariable,java.math.BigInteger> getValue)
public static java.lang.Boolean eval(MmuCondition cond, Function<IntegerVariable,java.math.BigInteger> getValue)