javax0.jamal.prog.commands.Block Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jamal-prog Show documentation
Show all versions of jamal-prog Show documentation
Jamal module for Programmatic Extension
The newest version!
package javax0.jamal.prog.commands;
import javax0.jamal.api.BadSyntax;
import java.util.List;
public class Block implements Command{
private final List commands;
public Block(final List commands) {
this.commands = commands;
}
@Override
public String execute(final Context ctx) throws BadSyntax {
ctx.step();
final var sb = new StringBuilder();
for (final var command : commands) {
sb.append(command.execute(ctx));
}
return sb.toString();
}
}