Skip to content

Instantly share code, notes, and snippets.

@zawhtutwin
Last active November 25, 2016 17:27
Show Gist options
  • Save zawhtutwin/184572050ab0679ce81bb9d4b9b90bf6 to your computer and use it in GitHub Desktop.
Save zawhtutwin/184572050ab0679ce81bb9d4b9b90bf6 to your computer and use it in GitHub Desktop.
public static void main(String[] arg){
ExpressionsEvaluator evalExpr = new ExpressionsBuilder("IF(TL_HS_NGUNG_LUONGKY1 == 1, 0, TL_HS_K_DC_KY1 * NS_HSL * TL_HS_TL_TTDV)").build();
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("TL_HS_NGUNG_LUONGKY1", 10);
variables.put("TL_HS_K_DC_KY1", 10);
variables.put("NS_HSL", 1);
variables.put("TL_HS_TL_TTDV", 12);
System.out.println(evalExpr.eval(variables));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment