class StandardPreparedQuery implements PreparedQuery {

    @Override
    public String evaluateExpressions(final Map<String, String> valMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException {
        final StringBuilder sb = new StringBuilder();
        for (final String val : queryStrings) {
            final Tree tree = trees.get(val);
            if (tree == null) {
                sb.append(val);
            } else {
                final String evaluated = Query.evaluateExpression(tree, val, valMap, decorator, stateVariables);
                if (evaluated != null) {
                    sb.append(evaluated);
                }
            }
        }
        return sb.toString();
    }

    public  StandardPreparedQuery(final List<String> queryStrings, final Map<String, Tree> trees);

}