Package com.spotify.github.v3.issues
Class ImmutableLabel
- java.lang.Object
-
- com.spotify.github.v3.issues.ImmutableLabel
-
- All Implemented Interfaces:
Label
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLabel extends java.lang.Object implements Label
Immutable implementation ofLabel
.Use the builder to create immutable instances:
ImmutableLabel.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableLabel.Builder
Builds instances of typeImmutableLabel
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLabel.Builder
builder()
Creates a builder forImmutableLabel
.java.lang.String
color()
Colorstatic ImmutableLabel
copyOf(Label instance)
Creates an immutable copy of aLabel
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofImmutableLabel
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:url
,name
,color
.java.lang.String
name()
Namejava.lang.String
toString()
Prints the immutable valueLabel
with attribute values.java.net.URI
url()
URLImmutableLabel
withColor(java.lang.String value)
Copy the current immutable object by setting a value for thecolor
attribute.ImmutableLabel
withName(java.lang.String value)
Copy the current immutable object by setting a value for thename
attribute.ImmutableLabel
withUrl(java.net.URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
withUrl
public final ImmutableLabel withUrl(@Nullable java.net.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
-
withName
public final ImmutableLabel withName(@Nullable java.lang.String value)
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name (can benull
)- Returns:
- A modified copy of the
this
object
-
withColor
public final ImmutableLabel withColor(@Nullable java.lang.String value)
Copy the current immutable object by setting a value for thecolor
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for color (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable java.lang.Object another)
This instance is equal to all instances ofImmutableLabel
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:url
,name
,color
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueLabel
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
public static ImmutableLabel copyOf(Label instance)
Creates an immutable copy of aLabel
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 Label instance
-
builder
public static ImmutableLabel.Builder builder()
Creates a builder forImmutableLabel
.ImmutableLabel.builder() .url(java.net.URI | null) // nullable
url
.name(String | null) // nullablename
.color(String | null) // nullablecolor
.build();- Returns:
- A new ImmutableLabel builder
-
-