org.yamcs.templating.TemplateBody Maven / Gradle / Ivy
package org.yamcs.templating;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TemplateBody {
private List statements = new ArrayList<>();
public void addStatement(Statement statement) {
statements.add(statement);
}
public String render(Map vars, Map filters) {
var buf = new StringBuilder();
for (var statement : statements) {
statement.render(buf, vars, filters);
}
return buf.toString();
}
}