Class ImmutableTag.Builder

  • Enclosing class:
    ImmutableTag

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

        @CanIgnoreReturnValue
        public final ImmutableTag.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 ImmutableTag.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 ImmutableTag.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 ImmutableTag.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