Class ImmutableChanges
- java.lang.Object
-
- com.spotify.github.v3.issues.changes.ImmutableChanges
-
- All Implemented Interfaces:
Changes
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableChanges extends Object implements Changes
Immutable implementation ofChanges
.Use the builder to create immutable instances:
ImmutableChanges.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableChanges.Builder
Builds instances of typeImmutableChanges
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Body
body()
The previous version of the body if the action was "edited".static ImmutableChanges.Builder
builder()
Creates a builder forImmutableChanges
.static ImmutableChanges
copyOf(Changes instance)
Creates an immutable copy of aChanges
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableChanges
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:body
.String
toString()
Prints the immutable valueChanges
with attribute values.ImmutableChanges
withBody(Body value)
Copy the current immutable object by setting a value for thebody
attribute.
-
-
-
Method Detail
-
body
@Nullable public Body body()
The previous version of the body if the action was "edited".
-
withBody
public final ImmutableChanges withBody(@Nullable Body value)
Copy the current immutable object by setting a value for thebody
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for body (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableChanges
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:body
.
-
toString
public String toString()
Prints the immutable valueChanges
with attribute values.
-
copyOf
public static ImmutableChanges copyOf(Changes instance)
Creates an immutable copy of aChanges
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 Changes instance
-
builder
public static ImmutableChanges.Builder builder()
Creates a builder forImmutableChanges
.ImmutableChanges.builder() .body(com.spotify.github.v3.issues.changes.Body | null) // nullable
body
.build();- Returns:
- A new ImmutableChanges builder
-
-