@Test public void upper() { ExpressionResult actual = testSubject.apply(expressionContext, mapValue("value", stringValue("abcdefg"))); assertEquals("ABCDEFG", actual.getValue()); }
@Override public ExpressionResult apply(ExpressionContext context, ExpressionResult input) { ExpressionResult value = expression.apply(context, input); return (value == null || !value.isNonNull()) ? NullExpressionResult.INSTANCE : new StringExpressionResult(value.toString().toUpperCase()); }
UpperExpression implements Expression { @Override public ExpressionResult apply(ExpressionContext context, ExpressionResult input) { ExpressionResult value = expression.apply(context, input); return (value == null || !value.isNonNull()) ? NullExpressionResult.INSTANCE : new StringExpressionResult(value.toString().toUpperCase()); } }
UpperExpression implements Expression { @Override public ExpressionResult apply(ExpressionContext context, ExpressionResult input) { ExpressionResult value = expression.apply(context, input); return (value == null || !value.isNonNull()) ? NullExpressionResult.INSTANCE : new StringExpressionResult(value.toString().toUpperCase()); } UpperExpression(String alias, Expression expression); }
UpperExpression implements Expression { @Override public ExpressionResult apply(ExpressionContext context, ExpressionResult input) { ExpressionResult value = expression.apply(context, input); return (value == null || !value.isNonNull()) ? NullExpressionResult.INSTANCE : new StringExpressionResult(value.toString().toUpperCase()); } UpperExpression(String alias, Expression expression); @Override ExpressionResult apply(ExpressionContext context, ExpressionResult input); @Override String alias(); }
UpperExpression implements Expression { @Override public ExpressionResult apply(ExpressionContext context, ExpressionResult input) { ExpressionResult value = expression.apply(context, input); return (value == null || !value.isNonNull()) ? NullExpressionResult.INSTANCE : new StringExpressionResult(value.toString().toUpperCase()); } UpperExpression(String alias, Expression expression); @Override ExpressionResult apply(ExpressionContext context, ExpressionResult input); @Override String alias();  }