Boolean Expression Evaluation in Java

前端 未结 10 1319
-上瘾入骨i
-上瘾入骨i 2020-12-05 16:26

I\'m looking for a relatively simpler (when compared with writing a parser) way to evaluate boolean expressions in Java, and I do not want to use the JEP library.

I

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-05 17:02

    Use Apache Commons Jexl; which is exactly designed for such requirement.

    http://commons.apache.org/jexl/

提交回复
热议问题