-
Notifications
You must be signed in to change notification settings - Fork 0
Code Samples
Magnus Karlsson edited this page Mar 11, 2015
·
1 revision
Evaluator evaluator = new Evaluator("max ( $1 , $2 )");
MyVar var1 = new MyVar();
var1.name = "1";
var1.value = 2.3456;
MyVar var2 = new MyVar();
var2.name = "2";
var2.value=22.89;
evaluator.bindVariable(var2);
evaluator.bindVariable(var1);
FunctionArgument<?> result = evaluator.evaluate();
new Evaluator("true == true").evaluate();
new Evaluator("False == true").evaluate();
new Evaluator("7 == 7").evaluate();
new Evaluator("3 < 7").evaluate();
new Evaluator("'AB' == 'AA'").evaluate();
new Evaluator(" 2 < 4 && 3 > 4 ").evaluate();
new Evaluator("len ( 'foo' ) < 4").evaluate();
new Evaluator("substr ( 'foo5bar' , 3 , 7 )").evaluate();
new Evaluator("len ( 'foo' )").evaluate();
new Evaluator("round ( 3.49494 )").evaluate();
new Evaluator("min ( 2.2929 , 3.49494 )").evaluate();
new Evaluator("max ( 2 , 3 ) + 2").evaluate();
new Evaluator("max ( 2.2929 , 3.49494 )").evaluate();