Package io.substrait.relation.files
Class ImmutableFileOrFiles.Builder
java.lang.Object
io.substrait.relation.files.ImmutableFileOrFiles.Builder
- Enclosing class:
- ImmutableFileOrFiles
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 Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableFileOrFiles.fileFormat(FileFormat fileFormat) Initializes the optional valuefileFormatto fileFormat.fileFormat(Optional<? extends FileFormat> fileFormat) Initializes the optional valuefileFormatto fileFormat.from(FileOrFiles instance) Fill a builder with attribute values from the providedFileOrFilesinstance.length(long length) Initializes the value for thelengthattribute.partitionIndex(long partitionIndex) Initializes the value for thepartitionIndexattribute.Initializes the optional valuepathto path.Initializes the optional valuepathto path.pathType(FileOrFiles.PathType pathType) Initializes the optional valuepathTypeto pathType.pathType(Optional<? extends FileOrFiles.PathType> pathType) Initializes the optional valuepathTypeto pathType.start(long start) Initializes the value for thestartattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedFileOrFilesinstance. 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:
thisbuilder for use in a chained invocation
-
pathType
Initializes the optional valuepathTypeto pathType.- Parameters:
pathType- The value for pathType- Returns:
thisbuilder for chained invocation
-
pathType
public final ImmutableFileOrFiles.Builder pathType(Optional<? extends FileOrFiles.PathType> pathType) Initializes the optional valuepathTypeto pathType.- Parameters:
pathType- The value for pathType- Returns:
thisbuilder for use in a chained invocation
-
path
Initializes the optional valuepathto path.- Parameters:
path- The value for path- Returns:
thisbuilder for chained invocation
-
path
Initializes the optional valuepathto path.- Parameters:
path- The value for path- Returns:
thisbuilder for use in a chained invocation
-
partitionIndex
Initializes the value for thepartitionIndexattribute.- Parameters:
partitionIndex- The value for partitionIndex- Returns:
thisbuilder for use in a chained invocation
-
start
Initializes the value for thestartattribute.- Parameters:
start- The value for start- Returns:
thisbuilder for use in a chained invocation
-
length
Initializes the value for thelengthattribute.- Parameters:
length- The value for length- Returns:
thisbuilder for use in a chained invocation
-
fileFormat
Initializes the optional valuefileFormatto fileFormat.- Parameters:
fileFormat- The value for fileFormat- Returns:
thisbuilder for chained invocation
-
fileFormat
Initializes the optional valuefileFormatto fileFormat.- Parameters:
fileFormat- The value for fileFormat- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableFileOrFiles.- Returns:
- An immutable instance of FileOrFiles
- Throws:
IllegalStateException- if any required attributes are missing
-