I would like to resolve the following condtion string. Because I would like to support dynamic condtion in my project.
a != 0 && b > 5
My expected Program is
public boolean resolve() {
String condition = "a != 0 && b > 5";
Map<String, Object> paramMap = new HashMap<String, Object>;
paramMap.put("a", 2);
paramMap.put("b", 6);
boolean result = ConditionResolver.resolve(condition, paramMap);
if(result) {
//do something
}
}
Update :
I am not trying to resolve the math equation, like below
((a + b) * y) /x