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 class
ImmutableTag.Builder
Builds instances of typeImmutableTag
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTag.Builder
builder()
Creates a builder forImmutableTag
.static ImmutableTag
copyOf(Tag instance)
Creates an immutable copy of aTag
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableTag
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sha
,url
,tag
,message
,tagger
,object
.String
message()
The tag message.ReferenceObject
object()
The SHA of the git object this is tagging.String
sha()
SHA.String
tag()
The tag.Author
tagger()
An object with information about the individual creating the tag.String
toString()
Prints the immutable valueTag
with attribute values.URI
url()
URL.ImmutableTag
withMessage(String value)
Copy the current immutable object by setting a value for themessage
attribute.ImmutableTag
withObject(ReferenceObject value)
Copy the current immutable object by setting a value for theobject
attribute.ImmutableTag
withSha(String value)
Copy the current immutable object by setting a value for thesha
attribute.ImmutableTag
withTag(String value)
Copy the current immutable object by setting a value for thetag
attribute.ImmutableTag
withTagger(Author value)
Copy the current immutable object by setting a value for thetagger
attribute.ImmutableTag
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
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 thesha
attribute. 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
this
object
-
withUrl
public final ImmutableTag withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurl
attribute. 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
this
object
-
withTag
public final ImmutableTag withTag(@Nullable String value)
Copy the current immutable object by setting a value for thetag
attribute. 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
this
object
-
withMessage
public final ImmutableTag withMessage(@Nullable String value)
Copy the current immutable object by setting a value for themessage
attribute. 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
this
object
-
withTagger
public final ImmutableTag withTagger(@Nullable Author value)
Copy the current immutable object by setting a value for thetagger
attribute. 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
this
object
-
withObject
public final ImmutableTag withObject(@Nullable ReferenceObject value)
Copy the current immutable object by setting a value for theobject
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableTag
that 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 valueTag
with attribute values.
-
copyOf
public static ImmutableTag copyOf(Tag instance)
Creates an immutable copy of aTag
value. 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) // nullable
sha
.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
-
-