@Test public void testEqualsEmbedded() { final Map<String, String> attributes = new HashMap<>(); attributes.put("x", "hello"); attributes.put("y", "good-bye"); verifyEquals("${x:equals( ${y} )}", attributes, false); attributes.put("y", "hello"); verifyEquals("${x:equals( ${y} )}", attributes, true); attributes.put("x", "4"); attributes.put("y", "3"); attributes.put("z", "1"); attributes.put("h", "100"); verifyEquals("${x:toNumber():lt( ${y:toNumber():plus( ${h:toNumber()} )} )}", attributes, true); verifyEquals("${h:toNumber():ge( ${y:toNumber():plus( ${z:toNumber()} )} )}", attributes, true); verifyEquals("${x:toNumber():equals( ${y:toNumber():plus( ${z:toNumber()} )} )}", attributes, true); attributes.put("x", "88"); verifyEquals("${x:toNumber():gt( ${y:toNumber():plus( ${z:toNumber()} )} )}", attributes, true); attributes.put("y", "88"); assertEquals("true", Query.evaluateExpressions("${x:equals( '${y}' )}", attributes, null)); }
static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); }
Query { static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); } }
Query { static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); } private  Query(final String query, final Tree tree, final Evaluator<?> evaluator); }
Query { static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); } private  Query(final String query, final Tree tree, final Evaluator<?> evaluator); static boolean isValidExpression(final String value); static ResultType getResultType(final String value); static List<ResultType> extractResultTypes(final String value); static List<String> extractExpressions(final String value); static List<Range> extractExpressionRanges(final String value); static void validateExpression(final String value, final boolean allowSurroundingCharacters); static String unescape(final String value); static Query fromTree(final Tree tree, final String text); static Tree compileTree(final String query); static PreparedQuery prepare(final String query); static Query compile(final String query); ResultType getResultType(); @Override String toString(); }
Query { static String evaluateExpressions(final String rawValue, Map<String, String> expressionMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException { return Query.prepare(rawValue).evaluateExpressions(expressionMap, decorator, stateVariables); } private  Query(final String query, final Tree tree, final Evaluator<?> evaluator); static boolean isValidExpression(final String value); static ResultType getResultType(final String value); static List<ResultType> extractResultTypes(final String value); static List<String> extractExpressions(final String value); static List<Range> extractExpressionRanges(final String value); static void validateExpression(final String value, final boolean allowSurroundingCharacters); static String unescape(final String value); static Query fromTree(final Tree tree, final String text); static Tree compileTree(final String query); static PreparedQuery prepare(final String query); static Query compile(final String query); ResultType getResultType(); @Override String toString();  }