Class ImmutableStats.Builder

java.lang.Object
io.substrait.hint.ImmutableStats.Builder
Enclosing class:
ImmutableStats

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

      public final ImmutableStats.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 ImmutableStats.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
    • rowCount

      public final ImmutableStats.Builder rowCount(double rowCount)
      Initializes the value for the rowCount attribute.
      Parameters:
      rowCount - The value for rowCount
      Returns:
      this builder for use in a chained invocation
    • recordSize

      public final ImmutableStats.Builder recordSize(double recordSize)
      Initializes the value for the recordSize attribute.
      Parameters:
      recordSize - The value for recordSize
      Returns:
      this builder for use in a chained invocation
    • build

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