Package com.spotify.github
Class ImmutableLinks
- java.lang.Object
-
- com.spotify.github.ImmutableLinks
-
- All Implemented Interfaces:
Links
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLinks extends Object implements Links
Immutable implementation ofLinks
.Use the builder to create immutable instances:
ImmutableLinks.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableLinks.Builder
Builds instances of typeImmutableLinks
.-
Nested classes/interfaces inherited from interface com.spotify.github.Links
Links.Href<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLinks.Builder
builder()
Creates a builder forImmutableLinks
.static ImmutableLinks
copyOf(Links instance)
Creates an immutable copy of aLinks
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableLinks
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:self
,html
.Links.Href<URI>
html()
Link to the HTML representaion of this item.Links.Href<URI>
self()
Link to this entity in the API.String
toString()
Prints the immutable valueLinks
with attribute values.ImmutableLinks
withHtml(Links.Href<URI> value)
Copy the current immutable object by setting a value for thehtml
attribute.ImmutableLinks
withSelf(Links.Href<URI> value)
Copy the current immutable object by setting a value for theself
attribute.
-
-
-
Method Detail
-
self
@Nullable public Links.Href<URI> self()
Link to this entity in the API.
-
html
@Nullable public Links.Href<URI> html()
Link to the HTML representaion of this item.
-
withSelf
public final ImmutableLinks withSelf(@Nullable Links.Href<URI> value)
Copy the current immutable object by setting a value for theself
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for self (can benull
)- Returns:
- A modified copy of the
this
object
-
withHtml
public final ImmutableLinks withHtml(@Nullable Links.Href<URI> value)
Copy the current immutable object by setting a value for thehtml
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for html (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableLinks
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:self
,html
.
-
toString
public String toString()
Prints the immutable valueLinks
with attribute values.
-
copyOf
public static ImmutableLinks copyOf(Links instance)
Creates an immutable copy of aLinks
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 Links instance
-
builder
public static ImmutableLinks.Builder builder()
Creates a builder forImmutableLinks
.ImmutableLinks.builder() .self(com.spotify.github.Links.Href<java.net.URI> | null) // nullable
self
.html(com.spotify.github.Links.Href<java.net.URI> | null) // nullablehtml
.build();- Returns:
- A new ImmutableLinks builder
-
-