Package io.substrait.relation.files
Class ImmutableFileOrFiles
java.lang.Object
io.substrait.relation.files.ImmutableFileOrFiles
- All Implemented Interfaces:
FileOrFiles
Immutable implementation of
FileOrFiles.
Use the builder to create immutable instances:
ImmutableFileOrFiles.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableFileOrFiles.Nested classes/interfaces inherited from interface io.substrait.relation.files.FileOrFiles
FileOrFiles.PathType -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableFileOrFiles.Builderbuilder()Creates a builder forImmutableFileOrFiles.static ImmutableFileOrFilescopyOf(FileOrFiles instance) Creates an immutable copy of aFileOrFilesvalue.booleanThis instance is equal to all instances ofImmutableFileOrFilesthat have equal attribute values.longlonggetPath()longgetStart()inthashCode()Computes a hash code from attributes:pathType,path,partitionIndex,start,length,fileFormat.pathType()toString()Prints the immutable valueFileOrFileswith attribute values.final ImmutableFileOrFileswithFileFormat(FileFormat value) Copy the current immutable object by setting a present value for the optionalfileFormatattribute.final ImmutableFileOrFileswithFileFormat(Optional<? extends FileFormat> optional) Copy the current immutable object by setting an optional value for thefileFormatattribute.final ImmutableFileOrFileswithLength(long value) Copy the current immutable object by setting a value for thelengthattribute.final ImmutableFileOrFileswithPartitionIndex(long value) Copy the current immutable object by setting a value for thepartitionIndexattribute.final ImmutableFileOrFilesCopy the current immutable object by setting a present value for the optionalpathattribute.final ImmutableFileOrFilesCopy the current immutable object by setting an optional value for thepathattribute.final ImmutableFileOrFileswithPathType(FileOrFiles.PathType value) Copy the current immutable object by setting a present value for the optionalpathTypeattribute.final ImmutableFileOrFileswithPathType(Optional<? extends FileOrFiles.PathType> optional) Copy the current immutable object by setting an optional value for thepathTypeattribute.final ImmutableFileOrFileswithStart(long value) Copy the current immutable object by setting a value for thestartattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.substrait.relation.files.FileOrFiles
toProto
-
Method Details
-
pathType
- Specified by:
pathTypein interfaceFileOrFiles- Returns:
- The value of the
pathTypeattribute
-
getPath
- Specified by:
getPathin interfaceFileOrFiles- Returns:
- The value of the
pathattribute
-
getPartitionIndex
public long getPartitionIndex()- Specified by:
getPartitionIndexin interfaceFileOrFiles- Returns:
- The value of the
partitionIndexattribute
-
getStart
public long getStart()- Specified by:
getStartin interfaceFileOrFiles- Returns:
- The value of the
startattribute
-
getLength
public long getLength()- Specified by:
getLengthin interfaceFileOrFiles- Returns:
- The value of the
lengthattribute
-
getFileFormat
- Specified by:
getFileFormatin interfaceFileOrFiles- Returns:
- The value of the
fileFormatattribute
-
withPathType
Copy the current immutable object by setting a present value for the optionalpathTypeattribute.- Parameters:
value- The value for pathType- Returns:
- A modified copy or
thisif not changed
-
withPathType
Copy the current immutable object by setting an optional value for thepathTypeattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for pathType- Returns:
- A modified copy or
thisif not changed
-
withPath
Copy the current immutable object by setting a present value for the optionalpathattribute.- Parameters:
value- The value for path- Returns:
- A modified copy or
thisif not changed
-
withPath
Copy the current immutable object by setting an optional value for thepathattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for path- Returns:
- A modified copy or
thisif not changed
-
withPartitionIndex
Copy the current immutable object by setting a value for thepartitionIndexattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for partitionIndex- Returns:
- A modified copy or the
thisobject
-
withStart
Copy the current immutable object by setting a value for thestartattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for start- Returns:
- A modified copy or the
thisobject
-
withLength
Copy the current immutable object by setting a value for thelengthattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for length- Returns:
- A modified copy or the
thisobject
-
withFileFormat
Copy the current immutable object by setting a present value for the optionalfileFormatattribute.- Parameters:
value- The value for fileFormat- Returns:
- A modified copy or
thisif not changed
-
withFileFormat
Copy the current immutable object by setting an optional value for thefileFormatattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for fileFormat- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableFileOrFilesthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:pathType,path,partitionIndex,start,length,fileFormat. -
toString
Prints the immutable valueFileOrFileswith attribute values. -
copyOf
Creates an immutable copy of aFileOrFilesvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable FileOrFiles instance
-
builder
Creates a builder forImmutableFileOrFiles.ImmutableFileOrFiles.builder() .pathType(Optional<io.substrait.relation.files.FileOrFiles.PathType>) // optionalpathType.path(Optional<String>) // optionalpath.partitionIndex(long) // requiredpartitionIndex.start(long) // requiredstart.length(long) // requiredlength.fileFormat(Optional<io.substrait.relation.files.FileFormat>) // optionalfileFormat.build();- Returns:
- A new ImmutableFileOrFiles builder
-