Class ImmutableMergeParameters.Builder

  • Enclosing class:
    ImmutableMergeParameters

    @NotThreadSafe
    public static final class ImmutableMergeParameters.Builder
    extends Object
    Builds instances of type ImmutableMergeParameters. 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 Detail

      • from

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

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

        @CanIgnoreReturnValue
        public final ImmutableMergeParameters.Builder commitMessage​(String commitMessage)
        Initializes the optional value commitMessage to commitMessage.
        Parameters:
        commitMessage - The value for commitMessage
        Returns:
        this builder for chained invocation
      • commitMessage

        @CanIgnoreReturnValue
        public final ImmutableMergeParameters.Builder commitMessage​(Optional<String> commitMessage)
        Initializes the optional value commitMessage to commitMessage.
        Parameters:
        commitMessage - The value for commitMessage
        Returns:
        this builder for use in a chained invocation
      • commitTitle

        @CanIgnoreReturnValue
        public final ImmutableMergeParameters.Builder commitTitle​(String commitTitle)
        Initializes the optional value commitTitle to commitTitle.
        Parameters:
        commitTitle - The value for commitTitle
        Returns:
        this builder for chained invocation
      • commitTitle

        @CanIgnoreReturnValue
        public final ImmutableMergeParameters.Builder commitTitle​(Optional<String> commitTitle)
        Initializes the optional value commitTitle to commitTitle.
        Parameters:
        commitTitle - The value for commitTitle
        Returns:
        this builder for use in a chained invocation
      • mergeMethod

        @CanIgnoreReturnValue
        public final ImmutableMergeParameters.Builder mergeMethod​(MergeMethod mergeMethod)
        Initializes the value for the mergeMethod attribute.

        If not set, this attribute will have a default value as returned by the initializer of mergeMethod.

        Parameters:
        mergeMethod - The value for mergeMethod
        Returns:
        this builder for use in a chained invocation