Class ImmutableType.Func.Builder

java.lang.Object
io.substrait.type.ImmutableType.Func.Builder
Enclosing class:
ImmutableType.Func

public static final class ImmutableType.Func.Builder extends Object
Builds instances of type Func. 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 ImmutableType.Func.Builder from(NullableType instance)
      Fill a builder with attribute values from the provided io.substrait.function.NullableType instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ImmutableType.Func.Builder from(Type instance)
      Fill a builder with attribute values from the provided io.substrait.type.Type instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final ImmutableType.Func.Builder from(Type.Func instance)
      Fill a builder with attribute values from the provided io.substrait.type.Type.Func instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • nullable

      public final ImmutableType.Func.Builder nullable(boolean nullable)
      Initializes the value for the nullable attribute.
      Parameters:
      nullable - The value for nullable
      Returns:
      this builder for use in a chained invocation
    • addParameterTypes

      public final ImmutableType.Func.Builder addParameterTypes(Type element)
      Adds one element to parameterTypes list.
      Parameters:
      element - A parameterTypes element
      Returns:
      this builder for use in a chained invocation
    • addParameterTypes

      public final ImmutableType.Func.Builder addParameterTypes(Type... elements)
      Adds elements to parameterTypes list.
      Parameters:
      elements - An array of parameterTypes elements
      Returns:
      this builder for use in a chained invocation
    • parameterTypes

      public final ImmutableType.Func.Builder parameterTypes(Iterable<? extends Type> elements)
      Sets or replaces all elements for parameterTypes list.
      Parameters:
      elements - An iterable of parameterTypes elements
      Returns:
      this builder for use in a chained invocation
    • addAllParameterTypes

      public final ImmutableType.Func.Builder addAllParameterTypes(Iterable<? extends Type> elements)
      Adds elements to parameterTypes list.
      Parameters:
      elements - An iterable of parameterTypes elements
      Returns:
      this builder for use in a chained invocation
    • returnType

      public final ImmutableType.Func.Builder returnType(Type returnType)
      Initializes the value for the returnType attribute.
      Parameters:
      returnType - The value for returnType
      Returns:
      this builder for use in a chained invocation
    • build

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