Package io.resys.hdes.client.spi
Class ImmutableGitFile.Builder
java.lang.Object
io.resys.hdes.client.spi.ImmutableGitFile.Builder
- Enclosing class:
- ImmutableGitFile
@NotThreadSafe public static final class ImmutableGitFile.Builder extends Object
Builds instances of type
ImmutableGitFile.
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 Type Method Description ImmutableGitFile.BuilderblobHash(String blobHash)Initializes the value for theblobHashattribute.ImmutableGitFile.BuilderblobValue(String blobValue)Initializes the value for theblobValueattribute.ImmutableGitFile.BuilderbodyType(AstBody.AstBodyType bodyType)Initializes the value for thebodyTypeattribute.ImmutableGitFilebuild()Builds a newImmutableGitFile.ImmutableGitFile.Builderfrom(GitConfig.GitFile instance)Fill a builder with attribute values from the providedGitFileinstance.ImmutableGitFile.Builderid(String id)Initializes the value for theidattribute.ImmutableGitFile.BuildertreeValue(String treeValue)Initializes the value for thetreeValueattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedGitFileinstance. 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
-
id
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
treeValue
Initializes the value for thetreeValueattribute.- Parameters:
treeValue- The value for treeValue- Returns:
thisbuilder for use in a chained invocation
-
blobValue
Initializes the value for theblobValueattribute.- Parameters:
blobValue- The value for blobValue- Returns:
thisbuilder for use in a chained invocation
-
blobHash
Initializes the value for theblobHashattribute.- Parameters:
blobHash- The value for blobHash- Returns:
thisbuilder for use in a chained invocation
-
bodyType
Initializes the value for thebodyTypeattribute.- Parameters:
bodyType- The value for bodyType- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableGitFile.- Returns:
- An immutable instance of GitFile
- Throws:
IllegalStateException- if any required attributes are missing
-