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 classImmutableChanges.BuilderBuilds instances of typeImmutableChanges.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Bodybody()The previous version of the body if the action was "edited".static ImmutableChanges.Builderbuilder()Creates a builder forImmutableChanges.static ImmutableChangescopyOf(Changes instance)Creates an immutable copy of aChangesvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableChangesthat have equal attribute values.inthashCode()Computes a hash code from attributes:body.StringtoString()Prints the immutable valueChangeswith attribute values.ImmutableChangeswithBody(Body value)Copy the current immutable object by setting a value for thebodyattribute.
-
-
-
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 thebodyattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableChangesthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:body.
-
toString
public String toString()
Prints the immutable valueChangeswith attribute values.
-
copyOf
public static ImmutableChanges copyOf(Changes instance)
Creates an immutable copy of aChangesvalue. 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) // nullablebody.build();- Returns:
- A new ImmutableChanges builder
-
-