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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableGitFile.Builder from​(GitConfig.GitFile instance)
      Fill a builder with attribute values from the provided GitFile 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
    • id

      @CanIgnoreReturnValue public final ImmutableGitFile.Builder id​(String id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id
      Returns:
      this builder for use in a chained invocation
    • treeValue

      @CanIgnoreReturnValue public final ImmutableGitFile.Builder treeValue​(String treeValue)
      Initializes the value for the treeValue attribute.
      Parameters:
      treeValue - The value for treeValue
      Returns:
      this builder for use in a chained invocation
    • blobValue

      @CanIgnoreReturnValue public final ImmutableGitFile.Builder blobValue​(String blobValue)
      Initializes the value for the blobValue attribute.
      Parameters:
      blobValue - The value for blobValue
      Returns:
      this builder for use in a chained invocation
    • blobHash

      @CanIgnoreReturnValue public final ImmutableGitFile.Builder blobHash​(String blobHash)
      Initializes the value for the blobHash attribute.
      Parameters:
      blobHash - The value for blobHash
      Returns:
      this builder for use in a chained invocation
    • bodyType

      @CanIgnoreReturnValue public final ImmutableGitFile.Builder bodyType​(AstBody.AstBodyType bodyType)
      Initializes the value for the bodyType attribute.
      Parameters:
      bodyType - The value for bodyType
      Returns:
      this builder for use in a chained invocation
    • build

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