Class ImmutableAggregate.Builder

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

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

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

      public final ImmutableAggregate.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 ImmutableAggregate.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 ImmutableAggregate.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 ImmutableAggregate.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 ImmutableAggregate.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 ImmutableAggregate.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
    • hint

      public final ImmutableAggregate.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 ImmutableAggregate.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
    • input

      public final ImmutableAggregate.Builder input(Rel input)
      Initializes the value for the input attribute.
      Parameters:
      input - The value for input
      Returns:
      this builder for use in a chained invocation
    • addGroupings

      public final ImmutableAggregate.Builder addGroupings(Aggregate.Grouping element)
      Adds one element to groupings list.
      Parameters:
      element - A groupings element
      Returns:
      this builder for use in a chained invocation
    • addGroupings

      public final ImmutableAggregate.Builder addGroupings(Aggregate.Grouping... elements)
      Adds elements to groupings list.
      Parameters:
      elements - An array of groupings elements
      Returns:
      this builder for use in a chained invocation
    • groupings

      public final ImmutableAggregate.Builder groupings(Iterable<? extends Aggregate.Grouping> elements)
      Sets or replaces all elements for groupings list.
      Parameters:
      elements - An iterable of groupings elements
      Returns:
      this builder for use in a chained invocation
    • addAllGroupings

      public final ImmutableAggregate.Builder addAllGroupings(Iterable<? extends Aggregate.Grouping> elements)
      Adds elements to groupings list.
      Parameters:
      elements - An iterable of groupings elements
      Returns:
      this builder for use in a chained invocation
    • addMeasures

      public final ImmutableAggregate.Builder addMeasures(Aggregate.Measure element)
      Adds one element to measures list.
      Parameters:
      element - A measures element
      Returns:
      this builder for use in a chained invocation
    • addMeasures

      public final ImmutableAggregate.Builder addMeasures(Aggregate.Measure... elements)
      Adds elements to measures list.
      Parameters:
      elements - An array of measures elements
      Returns:
      this builder for use in a chained invocation
    • measures

      public final ImmutableAggregate.Builder measures(Iterable<? extends Aggregate.Measure> elements)
      Sets or replaces all elements for measures list.
      Parameters:
      elements - An iterable of measures elements
      Returns:
      this builder for use in a chained invocation
    • addAllMeasures

      public final ImmutableAggregate.Builder addAllMeasures(Iterable<? extends Aggregate.Measure> elements)
      Adds elements to measures list.
      Parameters:
      elements - An iterable of measures elements
      Returns:
      this builder for use in a chained invocation
    • build

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