Package com.spotify.github.v3.git
Class ImmutableShaLink
- java.lang.Object
-
- com.spotify.github.v3.git.ImmutableShaLink
-
- All Implemented Interfaces:
ShaLink
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableShaLink extends Object implements ShaLink
Immutable implementation ofShaLink
.Use the builder to create immutable instances:
ImmutableShaLink.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableShaLink.Builder
Builds instances of typeImmutableShaLink
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableShaLink.Builder
builder()
Creates a builder forImmutableShaLink
.static ImmutableShaLink
copyOf(ShaLink instance)
Creates an immutable copy of aShaLink
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableShaLink
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sha
,url
.String
sha()
SHA.String
toString()
Prints the immutable valueShaLink
with attribute values.URI
url()
URL.ImmutableShaLink
withSha(String value)
Copy the current immutable object by setting a value for thesha
attribute.ImmutableShaLink
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
withSha
public final ImmutableShaLink 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 ImmutableShaLink 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
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableShaLink
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:sha
,url
.
-
toString
public String toString()
Prints the immutable valueShaLink
with attribute values.
-
copyOf
public static ImmutableShaLink copyOf(ShaLink instance)
Creates an immutable copy of aShaLink
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 ShaLink instance
-
builder
public static ImmutableShaLink.Builder builder()
Creates a builder forImmutableShaLink
.ImmutableShaLink.builder() .sha(String | null) // nullable
sha
.url(java.net.URI | null) // nullableurl
.build();- Returns:
- A new ImmutableShaLink builder
-
-