Class ImmutableBranch.Builder

  • Enclosing class:
    ImmutableBranch

    @NotThreadSafe
    public static final class ImmutableBranch.Builder
    extends Object
    Builds instances of type ImmutableBranch. 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 ImmutableBranch.Builder from​(Branch instance)
        Fill a builder with attribute values from the provided org.projectnessie.model.Branch instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableBranch.Builder from​(Reference instance)
        Fill a builder with attribute values from the provided org.projectnessie.model.Reference instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • name

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

        @CanIgnoreReturnValue
        public final ImmutableBranch.Builder metadata​(@Nullable
                                                      ReferenceMetadata metadata)
        Initializes the value for the metadata attribute.
        Parameters:
        metadata - The value for metadata (can be null)
        Returns:
        this builder for use in a chained invocation
      • hash

        @CanIgnoreReturnValue
        public final ImmutableBranch.Builder hash​(@Nullable
                                                  String hash)
        Initializes the value for the hash attribute.
        Parameters:
        hash - The value for hash (can be null)
        Returns:
        this builder for use in a chained invocation