Class If<T>

  • Type Parameters:
    T - the return type of this If
    All Implemented Interfaces:
    java.io.Serializable, ProtelisAST<T>, WithBytecode

    public final class If<T>
    extends AbstractProtelisAST<T>
    Branch, restricting domain of true and false branches into their own aligned subspaces.
    See Also:
    Serialized Form
    • Constructor Detail

      • If

        public If​(@Nonnull
                  Metadata metadata,
                  @Nonnull
                  ProtelisAST<java.lang.Boolean> cond,
                  @Nonnull
                  ProtelisAST<T> then,
                  @Nonnull
                  ProtelisAST<T> otherwise)
        Parameters:
        metadata - A Metadata object containing information about the code that generated this AST node.
        cond - condition
        then - branch to execute if condition is true (erase otherwise)
        otherwise - branch to execute if condition is false (erase otherwise)