Package org.projectnessie.model
Class ImmutableTag.Builder
- java.lang.Object
-
- org.projectnessie.model.ImmutableTag.Builder
-
- Enclosing class:
- ImmutableTag
@NotThreadSafe public static final class ImmutableTag.Builder extends Object
Builds instances of typeImmutableTag. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableTagbuild()Builds a newImmutableTag.ImmutableTag.Builderfrom(Reference instance)Fill a builder with attribute values from the providedorg.projectnessie.model.Referenceinstance.ImmutableTag.Builderfrom(Tag instance)Fill a builder with attribute values from the providedorg.projectnessie.model.Taginstance.ImmutableTag.Builderhash(String hash)Initializes the value for thehashattribute.ImmutableTag.Buildername(String name)Initializes the value for thenameattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTag.Builder from(Reference instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.Referenceinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableTag.Builder from(Tag instance)
Fill a builder with attribute values from the providedorg.projectnessie.model.Taginstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
@CanIgnoreReturnValue public final ImmutableTag.Builder name(String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
hash
@CanIgnoreReturnValue public final ImmutableTag.Builder hash(@Nullable String hash)
Initializes the value for thehashattribute.- Parameters:
hash- The value for hash (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTag build()
Builds a newImmutableTag.- Returns:
- An immutable instance of Tag
- Throws:
IllegalStateException- if any required attributes are missing
-
-