Package com.spotify.github.v3.git
Class ImmutableTag
- java.lang.Object
-
- com.spotify.github.v3.git.ImmutableTag
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTag extends Object implements Tag
Immutable implementation ofTag.Use the builder to create immutable instances:
ImmutableTag.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTag.BuilderBuilds instances of typeImmutableTag.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTag.Builderbuilder()Creates a builder forImmutableTag.static ImmutableTagcopyOf(Tag instance)Creates an immutable copy of aTagvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableTagthat have equal attribute values.inthashCode()Computes a hash code from attributes:sha,url,tag,message,tagger,object.Stringmessage()The tag message.ReferenceObjectobject()The SHA of the git object this is tagging.Stringsha()SHA.Stringtag()The tag.Authortagger()An object with information about the individual creating the tag.StringtoString()Prints the immutable valueTagwith attribute values.URIurl()URL.ImmutableTagwithMessage(String value)Copy the current immutable object by setting a value for themessageattribute.ImmutableTagwithObject(ReferenceObject value)Copy the current immutable object by setting a value for theobjectattribute.ImmutableTagwithSha(String value)Copy the current immutable object by setting a value for theshaattribute.ImmutableTagwithTag(String value)Copy the current immutable object by setting a value for thetagattribute.ImmutableTagwithTagger(Author value)Copy the current immutable object by setting a value for thetaggerattribute.ImmutableTagwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
tagger
@Nullable public Author tagger()
An object with information about the individual creating the tag.
-
object
@Nullable public ReferenceObject object()
The SHA of the git object this is tagging.
-
withSha
public final ImmutableTag withSha(@Nullable String value)
Copy the current immutable object by setting a value for theshaattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sha (can benull)- Returns:
- A modified copy of the
thisobject
-
withUrl
public final ImmutableTag withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for url (can benull)- Returns:
- A modified copy of the
thisobject
-
withTag
public final ImmutableTag withTag(@Nullable String value)
Copy the current immutable object by setting a value for thetagattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tag (can benull)- Returns:
- A modified copy of the
thisobject
-
withMessage
public final ImmutableTag withMessage(@Nullable String value)
Copy the current immutable object by setting a value for themessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message (can benull)- Returns:
- A modified copy of the
thisobject
-
withTagger
public final ImmutableTag withTagger(@Nullable Author value)
Copy the current immutable object by setting a value for thetaggerattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tagger (can benull)- Returns:
- A modified copy of the
thisobject
-
withObject
public final ImmutableTag withObject(@Nullable ReferenceObject value)
Copy the current immutable object by setting a value for theobjectattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for object (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableTagthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:sha,url,tag,message,tagger,object.
-
toString
public String toString()
Prints the immutable valueTagwith attribute values.
-
copyOf
public static ImmutableTag copyOf(Tag instance)
Creates an immutable copy of aTagvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Tag instance
-
builder
public static ImmutableTag.Builder builder()
Creates a builder forImmutableTag.ImmutableTag.builder() .sha(String | null) // nullablesha.url(java.net.URI | null) // nullableurl.tag(String | null) // nullabletag.message(String | null) // nullablemessage.tagger(com.spotify.github.v3.git.Author | null) // nullabletagger.object(com.spotify.github.v3.git.ReferenceObject | null) // nullableobject.build();- Returns:
- A new ImmutableTag builder
-
-