Package com.spotify.github.v3.git
Class ImmutableParentItem
- java.lang.Object
-
- com.spotify.github.v3.git.ImmutableParentItem
-
- All Implemented Interfaces:
ParentItem
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableParentItem extends Object implements ParentItem
Immutable implementation ofParentItem
.Use the builder to create immutable instances:
ImmutableParentItem.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableParentItem.Builder
Builds instances of typeImmutableParentItem
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableParentItem.Builder
builder()
Creates a builder forImmutableParentItem
.static ImmutableParentItem
copyOf(ParentItem instance)
Creates an immutable copy of aParentItem
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableParentItem
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sha
,url
,htmlUrl
.URI
htmlUrl()
String
sha()
String
toString()
Prints the immutable valueParentItem
with attribute values.URI
url()
ImmutableParentItem
withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutableParentItem
withSha(String value)
Copy the current immutable object by setting a value for thesha
attribute.ImmutableParentItem
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
sha
@Nullable public String sha()
- Specified by:
sha
in interfaceParentItem
- Returns:
- The value of the
sha
attribute
-
url
@Nullable public URI url()
- Specified by:
url
in interfaceParentItem
- Returns:
- The value of the
url
attribute
-
htmlUrl
@Nullable public URI htmlUrl()
- Specified by:
htmlUrl
in interfaceParentItem
- Returns:
- The value of the
htmlUrl
attribute
-
withSha
public final ImmutableParentItem 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 ImmutableParentItem 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
-
withHtmlUrl
public final ImmutableParentItem withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for htmlUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableParentItem
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:sha
,url
,htmlUrl
.
-
toString
public String toString()
Prints the immutable valueParentItem
with attribute values.
-
copyOf
public static ImmutableParentItem copyOf(ParentItem instance)
Creates an immutable copy of aParentItem
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 ParentItem instance
-
builder
public static ImmutableParentItem.Builder builder()
Creates a builder forImmutableParentItem
.ImmutableParentItem.builder() .sha(String | null) // nullable
sha
.url(java.net.URI | null) // nullableurl
.htmlUrl(java.net.URI | null) // nullablehtmlUrl
.build();- Returns:
- A new ImmutableParentItem builder
-
-