Package com.spotify.github.v3.git
Class ImmutableTag.Builder
- java.lang.Object
-
- com.spotify.github.v3.git.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(ShaLink instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.git.ShaLinkinstance.ImmutableTag.Builderfrom(Tag instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.git.Taginstance.ImmutableTag.Buildermessage(String message)Initializes the value for themessageattribute.ImmutableTag.Builderobject(ReferenceObject object)Initializes the value for theobjectattribute.ImmutableTag.Buildersha(String sha)Initializes the value for theshaattribute.ImmutableTag.Buildertag(String tag)Initializes the value for thetagattribute.ImmutableTag.Buildertagger(Author tagger)Initializes the value for thetaggerattribute.ImmutableTag.Builderurl(URI url)Initializes the value for theurlattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTag.Builder from(Tag instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.Taginstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableTag.Builder from(ShaLink instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.ShaLinkinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
sha
@CanIgnoreReturnValue public final ImmutableTag.Builder sha(@Nullable String sha)
Initializes the value for theshaattribute.- Parameters:
sha- The value for sha (can benull)- Returns:
thisbuilder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableTag.Builder url(@Nullable URI url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url (can benull)- Returns:
thisbuilder for use in a chained invocation
-
tag
@CanIgnoreReturnValue public final ImmutableTag.Builder tag(@Nullable String tag)
Initializes the value for thetagattribute.- Parameters:
tag- The value for tag (can benull)- Returns:
thisbuilder for use in a chained invocation
-
message
@CanIgnoreReturnValue public final ImmutableTag.Builder message(@Nullable String message)
Initializes the value for themessageattribute.- Parameters:
message- The value for message (can benull)- Returns:
thisbuilder for use in a chained invocation
-
tagger
@CanIgnoreReturnValue public final ImmutableTag.Builder tagger(@Nullable Author tagger)
Initializes the value for thetaggerattribute.- Parameters:
tagger- The value for tagger (can benull)- Returns:
thisbuilder for use in a chained invocation
-
object
@CanIgnoreReturnValue public final ImmutableTag.Builder object(@Nullable ReferenceObject object)
Initializes the value for theobjectattribute.- Parameters:
object- The value for object (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
-
-