Class ImmutableFileOrFiles.Builder

java.lang.Object
io.substrait.relation.files.ImmutableFileOrFiles.Builder
Enclosing class:
ImmutableFileOrFiles

public static final class ImmutableFileOrFiles.Builder extends Object
Builds instances of type ImmutableFileOrFiles. 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 ImmutableFileOrFiles.Builder from(FileOrFiles instance)
      Fill a builder with attribute values from the provided FileOrFiles 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
    • pathType

      public final ImmutableFileOrFiles.Builder pathType(FileOrFiles.PathType pathType)
      Initializes the optional value pathType to pathType.
      Parameters:
      pathType - The value for pathType
      Returns:
      this builder for chained invocation
    • pathType

      public final ImmutableFileOrFiles.Builder pathType(Optional<? extends FileOrFiles.PathType> pathType)
      Initializes the optional value pathType to pathType.
      Parameters:
      pathType - The value for pathType
      Returns:
      this builder for use in a chained invocation
    • path

      public final ImmutableFileOrFiles.Builder path(String path)
      Initializes the optional value path to path.
      Parameters:
      path - The value for path
      Returns:
      this builder for chained invocation
    • path

      public final ImmutableFileOrFiles.Builder path(Optional<String> path)
      Initializes the optional value path to path.
      Parameters:
      path - The value for path
      Returns:
      this builder for use in a chained invocation
    • partitionIndex

      public final ImmutableFileOrFiles.Builder partitionIndex(long partitionIndex)
      Initializes the value for the partitionIndex attribute.
      Parameters:
      partitionIndex - The value for partitionIndex
      Returns:
      this builder for use in a chained invocation
    • start

      public final ImmutableFileOrFiles.Builder start(long start)
      Initializes the value for the start attribute.
      Parameters:
      start - The value for start
      Returns:
      this builder for use in a chained invocation
    • length

      public final ImmutableFileOrFiles.Builder length(long length)
      Initializes the value for the length attribute.
      Parameters:
      length - The value for length
      Returns:
      this builder for use in a chained invocation
    • fileFormat

      public final ImmutableFileOrFiles.Builder fileFormat(FileFormat fileFormat)
      Initializes the optional value fileFormat to fileFormat.
      Parameters:
      fileFormat - The value for fileFormat
      Returns:
      this builder for chained invocation
    • fileFormat

      public final ImmutableFileOrFiles.Builder fileFormat(Optional<? extends FileFormat> fileFormat)
      Initializes the optional value fileFormat to fileFormat.
      Parameters:
      fileFormat - The value for fileFormat
      Returns:
      this builder for use in a chained invocation
    • build

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