@Test public void testDecisionAll() throws Exception { final JSONObject j = getObjectByLayerId("decisionAll", "layout"); assertFalse(getExpressionEvaluationAsBoolean(j, "all-trueFalseFalse")); assertFalse(getExpressionEvaluationAsBoolean(j, "all-falseFalseTrue")); assertFalse(getExpressionEvaluationAsBoolean(j, "all-allFalse")); assertTrue(getExpressionEvaluationAsBoolean(j, "all-allTrue")); assertFalse(getExpressionEvaluationAsBoolean(j, "all-nullFalseFalse")); assertFalse(getExpressionEvaluationAsBoolean(j, "all-chainedFalseTrueFalse")); assertFalse(getExpressionEvaluationAsBoolean(j, "all-chainedAllFalse")); assertTrue(getExpressionEvaluationAsBoolean(j, "all-chainedAllTrue")); assertFalse(getExpressionEvaluationAsBoolean(j, "all-chained")); }
private Expression decisionAll() { 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("all", expressions); }
MBDecision extends MBExpression { private Expression decisionAll() { 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("all", expressions); } }
MBDecision extends MBExpression { private Expression decisionAll() { 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("all", expressions); } MBDecision(JSONArray json); }
MBDecision extends MBExpression { private Expression decisionAll() { 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("all", expressions); } MBDecision(JSONArray json); @Override Expression getExpression(); }
MBDecision extends MBExpression { private Expression decisionAll() { 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("all", expressions); } MBDecision(JSONArray json); @Override Expression getExpression();  }