Class ImmutableSet.Builder

java.lang.Object
io.substrait.relation.ImmutableSet.Builder
Enclosing class:
ImmutableSet

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

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

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

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

      public final ImmutableSet.Builder extension(AdvancedExtension extension)
      Initializes the optional value extension to extension.
      Parameters:
      extension - The value for extension
      Returns:
      this builder for chained invocation
    • extension

      public final ImmutableSet.Builder extension(Optional<? extends AdvancedExtension> extension)
      Initializes the optional value extension to extension.
      Parameters:
      extension - The value for extension
      Returns:
      this builder for use in a chained invocation
    • remap

      public final ImmutableSet.Builder remap(Rel.Remap remap)
      Initializes the optional value remap to remap.
      Parameters:
      remap - The value for remap
      Returns:
      this builder for chained invocation
    • remap

      public final ImmutableSet.Builder remap(Optional<? extends Rel.Remap> remap)
      Initializes the optional value remap to remap.
      Parameters:
      remap - The value for remap
      Returns:
      this builder for use in a chained invocation
    • commonExtension

      public final ImmutableSet.Builder commonExtension(AdvancedExtension commonExtension)
      Initializes the optional value commonExtension to commonExtension.
      Parameters:
      commonExtension - The value for commonExtension
      Returns:
      this builder for chained invocation
    • commonExtension

      public final ImmutableSet.Builder commonExtension(Optional<? extends AdvancedExtension> commonExtension)
      Initializes the optional value commonExtension to commonExtension.
      Parameters:
      commonExtension - The value for commonExtension
      Returns:
      this builder for use in a chained invocation
    • addInputs

      public final ImmutableSet.Builder addInputs(Rel element)
      Adds one element to inputs list.
      Parameters:
      element - A inputs element
      Returns:
      this builder for use in a chained invocation
    • addInputs

      public final ImmutableSet.Builder addInputs(Rel... elements)
      Adds elements to inputs list.
      Parameters:
      elements - An array of inputs elements
      Returns:
      this builder for use in a chained invocation
    • inputs

      public final ImmutableSet.Builder inputs(Iterable<? extends Rel> elements)
      Sets or replaces all elements for inputs list.
      Parameters:
      elements - An iterable of inputs elements
      Returns:
      this builder for use in a chained invocation
    • addAllInputs

      public final ImmutableSet.Builder addAllInputs(Iterable<? extends Rel> elements)
      Adds elements to inputs list.
      Parameters:
      elements - An iterable of inputs elements
      Returns:
      this builder for use in a chained invocation
    • hint

      public final ImmutableSet.Builder hint(Hint hint)
      Initializes the optional value hint to hint.
      Parameters:
      hint - The value for hint
      Returns:
      this builder for chained invocation
    • hint

      public final ImmutableSet.Builder hint(Optional<? extends Hint> hint)
      Initializes the optional value hint to hint.
      Parameters:
      hint - The value for hint
      Returns:
      this builder for use in a chained invocation
    • setOp

      public final ImmutableSet.Builder setOp(Set.SetOp setOp)
      Initializes the value for the setOp attribute.
      Parameters:
      setOp - The value for setOp
      Returns:
      this builder for use in a chained invocation
    • build

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