@Test public void inContainsIdentifier() { ExpressionResult actual = testSubject.apply(expressionContext, mapValue("value", stringValue("c"), "otherValue", stringValue("c"))); assertTrue(actual.isTrue()); }
@Override public ExpressionResult apply(ExpressionContext context, ExpressionResult data) { ExpressionResult val1 = first.apply(context, data); if( second instanceof ListExpression) { for( Expression expression : ((ListExpression) second).items()) { ExpressionResult val2 = expression.apply(context, data); if( doEvaluate(val1, val2)) return BooleanExpressionResult.forValue(true); } return BooleanExpressionResult.forValue(false); } ExpressionResult val2 = second.apply(context, data); return BooleanExpressionResult.forValue(doEvaluate(val1, val2)); }
InExpression extends AbstractBooleanExpression { @Override public ExpressionResult apply(ExpressionContext context, ExpressionResult data) { ExpressionResult val1 = first.apply(context, data); if( second instanceof ListExpression) { for( Expression expression : ((ListExpression) second).items()) { ExpressionResult val2 = expression.apply(context, data); if( doEvaluate(val1, val2)) return BooleanExpressionResult.forValue(true); } return BooleanExpressionResult.forValue(false); } ExpressionResult val2 = second.apply(context, data); return BooleanExpressionResult.forValue(doEvaluate(val1, val2)); } }
InExpression extends AbstractBooleanExpression { @Override public ExpressionResult apply(ExpressionContext context, ExpressionResult data) { ExpressionResult val1 = first.apply(context, data); if( second instanceof ListExpression) { for( Expression expression : ((ListExpression) second).items()) { ExpressionResult val2 = expression.apply(context, data); if( doEvaluate(val1, val2)) return BooleanExpressionResult.forValue(true); } return BooleanExpressionResult.forValue(false); } ExpressionResult val2 = second.apply(context, data); return BooleanExpressionResult.forValue(doEvaluate(val1, val2)); } InExpression(String alias, Expression[] params); }
InExpression extends AbstractBooleanExpression { @Override public ExpressionResult apply(ExpressionContext context, ExpressionResult data) { ExpressionResult val1 = first.apply(context, data); if( second instanceof ListExpression) { for( Expression expression : ((ListExpression) second).items()) { ExpressionResult val2 = expression.apply(context, data); if( doEvaluate(val1, val2)) return BooleanExpressionResult.forValue(true); } return BooleanExpressionResult.forValue(false); } ExpressionResult val2 = second.apply(context, data); return BooleanExpressionResult.forValue(doEvaluate(val1, val2)); } InExpression(String alias, Expression[] params); @Override ExpressionResult apply(ExpressionContext context, ExpressionResult data); }
InExpression extends AbstractBooleanExpression { @Override public ExpressionResult apply(ExpressionContext context, ExpressionResult data) { ExpressionResult val1 = first.apply(context, data); if( second instanceof ListExpression) { for( Expression expression : ((ListExpression) second).items()) { ExpressionResult val2 = expression.apply(context, data); if( doEvaluate(val1, val2)) return BooleanExpressionResult.forValue(true); } return BooleanExpressionResult.forValue(false); } ExpressionResult val2 = second.apply(context, data); return BooleanExpressionResult.forValue(doEvaluate(val1, val2)); } InExpression(String alias, Expression[] params); @Override ExpressionResult apply(ExpressionContext context, ExpressionResult data);  }