Class ImmutableExpression.Cast.Builder

java.lang.Object
io.substrait.expression.ImmutableExpression.Cast.Builder
Enclosing class:
ImmutableExpression.Cast

public static final class ImmutableExpression.Cast.Builder extends Object
Builds instances of type Cast. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final ImmutableExpression.Cast.Builder from(Expression.Cast instance)
      Fill a builder with attribute values from the provided Cast instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • type

      public final ImmutableExpression.Cast.Builder type(Type type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • input

      public final ImmutableExpression.Cast.Builder input(Expression input)
      Initializes the value for the input attribute.
      Parameters:
      input - The value for input
      Returns:
      this builder for use in a chained invocation
    • failureBehavior

      public final ImmutableExpression.Cast.Builder failureBehavior(Expression.FailureBehavior failureBehavior)
      Initializes the value for the failureBehavior attribute.
      Parameters:
      failureBehavior - The value for failureBehavior
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableExpression.Cast build()
      Builds a new Cast.
      Returns:
      An immutable instance of Cast
      Throws:
      IllegalStateException - if any required attributes are missing