@Test public void testDecisionAny() throws Exception { final JSONObject j = getObjectByLayerId("decisionAny", "layout"); assertTrue(getExpressionEvaluationAsBoolean(j, "any-trueFalseFalse")); assertTrue(getExpressionEvaluationAsBoolean(j, "any-falseFalseTrue")); assertFalse(getExpressionEvaluationAsBoolean(j, "any-allFalse")); assertTrue(getExpressionEvaluationAsBoolean(j, "any-allTrue")); assertFalse(getExpressionEvaluationAsBoolean(j, "any-nullFalseFalse")); assertTrue(getExpressionEvaluationAsBoolean(j, "any-chainedFalseTrueFalse")); assertFalse(getExpressionEvaluationAsBoolean(j, "any-chainedAllFalse")); assertTrue(getExpressionEvaluationAsBoolean(j, "any-chainedAllTrue")); }
private Expression decisionAny() { if (json.size() < 2) { throwInsufficientArgumentCount(ALL, 1); } Expression[] expressions = new Expression[json.size() - 1]; for (int i = 1; i < json.size(); ++i) { Expression expression = parse.string(json, i); expressions[i - 1] = expression; } return ff.function("any", expressions); }
MBDecision extends MBExpression { private Expression decisionAny() { if (json.size() < 2) { throwInsufficientArgumentCount(ALL, 1); } Expression[] expressions = new Expression[json.size() - 1]; for (int i = 1; i < json.size(); ++i) { Expression expression = parse.string(json, i); expressions[i - 1] = expression; } return ff.function("any", expressions); } }
MBDecision extends MBExpression { private Expression decisionAny() { if (json.size() < 2) { throwInsufficientArgumentCount(ALL, 1); } Expression[] expressions = new Expression[json.size() - 1]; for (int i = 1; i < json.size(); ++i) { Expression expression = parse.string(json, i); expressions[i - 1] = expression; } return ff.function("any", expressions); } MBDecision(JSONArray json); }
MBDecision extends MBExpression { private Expression decisionAny() { if (json.size() < 2) { throwInsufficientArgumentCount(ALL, 1); } Expression[] expressions = new Expression[json.size() - 1]; for (int i = 1; i < json.size(); ++i) { Expression expression = parse.string(json, i); expressions[i - 1] = expression; } return ff.function("any", expressions); } MBDecision(JSONArray json); @Override Expression getExpression(); }
MBDecision extends MBExpression { private Expression decisionAny() { if (json.size() < 2) { throwInsufficientArgumentCount(ALL, 1); } Expression[] expressions = new Expression[json.size() - 1]; for (int i = 1; i < json.size(); ++i) { Expression expression = parse.string(json, i); expressions[i - 1] = expression; } return ff.function("any", expressions); } MBDecision(JSONArray json); @Override Expression getExpression();  }