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 classImmutableParentItem.BuilderBuilds instances of typeImmutableParentItem.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableParentItem.Builderbuilder()Creates a builder forImmutableParentItem.static ImmutableParentItemcopyOf(ParentItem instance)Creates an immutable copy of aParentItemvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableParentItemthat have equal attribute values.inthashCode()Computes a hash code from attributes:sha,url,htmlUrl.URIhtmlUrl()Stringsha()StringtoString()Prints the immutable valueParentItemwith attribute values.URIurl()ImmutableParentItemwithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableParentItemwithSha(String value)Copy the current immutable object by setting a value for theshaattribute.ImmutableParentItemwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
sha
@Nullable public String sha()
- Specified by:
shain interfaceParentItem- Returns:
- The value of the
shaattribute
-
url
@Nullable public URI url()
- Specified by:
urlin interfaceParentItem- Returns:
- The value of the
urlattribute
-
htmlUrl
@Nullable public URI htmlUrl()
- Specified by:
htmlUrlin interfaceParentItem- Returns:
- The value of the
htmlUrlattribute
-
withSha
public final ImmutableParentItem 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 ImmutableParentItem 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
-
withHtmlUrl
public final ImmutableParentItem withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrlattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableParentItemthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:sha,url,htmlUrl.
-
toString
public String toString()
Prints the immutable valueParentItemwith attribute values.
-
copyOf
public static ImmutableParentItem copyOf(ParentItem instance)
Creates an immutable copy of aParentItemvalue. 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) // nullablesha.url(java.net.URI | null) // nullableurl.htmlUrl(java.net.URI | null) // nullablehtmlUrl.build();- Returns:
- A new ImmutableParentItem builder
-
-