Class FileInfo.FileInfoBuilder<C extends FileInfo,B extends FileInfo.FileInfoBuilder<C,B>>
java.lang.Object
io.github.astrapi69.file.create.model.FileInfo.FileInfoBuilder<C,B>
- Type Parameters:
C
- the type of `FileInfo` to buildB
- the type of builder for `FileInfo`
- Direct Known Subclasses:
FileContentInfo.FileContentInfoBuilder
- Enclosing class:
- FileInfo
public abstract static class FileInfo.FileInfoBuilder<C extends FileInfo,B extends FileInfo.FileInfoBuilder<C,B>>
extends Object
The builder class for constructing `FileInfo` objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected B
$fillValuesFrom
(C instance) Internal method to fill the builder with values from an existing `FileInfo` instance.abstract C
build()
Builds the `FileInfo` object.directory
(boolean directory) Sets whether the file is a directory.Sets the name of the file.Sets the path of the file.protected abstract B
self()
Returns this builder instance.toString()
Returns a string representation of the builder.
-
Constructor Details
-
FileInfoBuilder
public FileInfoBuilder()
-
-
Method Details
-
name
Sets the name of the file.- Parameters:
name
- the name of the file- Returns:
- this builder instance
-
path
Sets the path of the file.- Parameters:
path
- the path of the file- Returns:
- this builder instance
-
directory
Sets whether the file is a directory.- Parameters:
directory
- true if the file is a directory, false otherwise- Returns:
- this builder instance
-
$fillValuesFrom
Internal method to fill the builder with values from an existing `FileInfo` instance.- Parameters:
instance
- the `FileInfo` instance to copy values from- Returns:
- this builder instance
-
self
Returns this builder instance.- Returns:
- this builder instance
-
build
Builds the `FileInfo` object.- Returns:
- the constructed `FileInfo` object
-
toString
Returns a string representation of the builder.
-