public final class ConditionalSideEffect extends AbstractProtelisAST<Unit>
Unit.| Constructor and Description |
|---|
ConditionalSideEffect(Metadata metadata,
ProtelisAST<java.lang.Boolean> cond,
ProtelisAST<?> then) |
| Modifier and Type | Method and Description |
|---|---|
Unit |
evaluate(ExecutionContext context)
Evaluates this AST node.
|
Bytecode |
getBytecode() |
java.lang.String |
toString() |
branchesToString, branchesToString, eval, forEach, forEachWithIndex, getBranch, getBranches, getBranchesNumber, getMetadata, getName, isNullable, stringForpublic ConditionalSideEffect(@Nonnull
Metadata metadata,
@Nonnull
ProtelisAST<java.lang.Boolean> cond,
@Nonnull
ProtelisAST<?> then)
metadata - A Metadata object containing information about the code that generated this AST node.cond - conditionthen - branch to execute if condition is true (erase otherwise)public Unit evaluate(ExecutionContext context)
AbstractProtelisASTAbstractProtelisAST takes care of storing the necessary metadata.evaluate in class AbstractProtelisAST<Unit>context - the execution contextpublic java.lang.String toString()
toString in class AbstractProtelisAST<Unit>