All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax0.jamal.prog.commands.Block Maven / Gradle / Ivy

There is a newer version: 2.8.1
Show 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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy