- Common ways to obtain Or
private void myMethod () {Or o =
ValueExpr leftArg;ValueExpr rightArg;new Or(leftArg, rightArg)
- Smart code suggestions by Codota
}
@Override public void meet(Or or) { super.meet(or); if (or.getLeftArg().equals(or.getRightArg())) { or.replaceWith(or.getLeftArg()); } }
if (isConstant(or.getLeftArg()) && isConstant(or.getRightArg())) { boolean value = strategy.isTrue(or, EmptyBindingSet.getInstance()); or.replaceWith(new ValueConstant(BooleanLiteral.valueOf(value))); or.replaceWith(new ValueConstant(BooleanLiteral.TRUE)); or.replaceWith(or.getRightArg()); boolean rightIsTrue = strategy.isTrue(or.getRightArg(), EmptyBindingSet.getInstance()); if (rightIsTrue) { or.replaceWith(new ValueConstant(BooleanLiteral.TRUE)); or.replaceWith(or.getLeftArg());