Package org.projectnessie.model
Class ImmutableDiffResponse
- java.lang.Object
-
- org.projectnessie.model.ImmutableDiffResponse
-
- All Implemented Interfaces:
DiffResponse
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDiffResponse extends Object implements DiffResponse
Immutable implementation ofDiffResponse.Use the builder to create immutable instances:
ImmutableDiffResponse.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableDiffResponse.BuilderBuilds instances of typeImmutableDiffResponse.-
Nested classes/interfaces inherited from interface org.projectnessie.model.DiffResponse
DiffResponse.DiffEntry
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDiffResponse.Builderbuilder()Creates a builder forImmutableDiffResponse.static ImmutableDiffResponsecopyOf(DiffResponse instance)Creates an immutable copy of aDiffResponsevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDiffResponsethat have equal attribute values.List<DiffResponse.DiffEntry>getDiffs()inthashCode()Computes a hash code from attributes:diffs.StringtoString()Prints the immutable valueDiffResponsewith attribute values.ImmutableDiffResponsewithDiffs(Iterable<? extends DiffResponse.DiffEntry> elements)Copy the current immutable object with elements that replace the content ofdiffs.ImmutableDiffResponsewithDiffs(DiffResponse.DiffEntry... elements)Copy the current immutable object with elements that replace the content ofdiffs.
-
-
-
Method Detail
-
getDiffs
public List<DiffResponse.DiffEntry> getDiffs()
- Specified by:
getDiffsin interfaceDiffResponse- Returns:
- The value of the
diffsattribute
-
withDiffs
public final ImmutableDiffResponse withDiffs(DiffResponse.DiffEntry... elements)
Copy the current immutable object with elements that replace the content ofdiffs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDiffs
public final ImmutableDiffResponse withDiffs(Iterable<? extends DiffResponse.DiffEntry> elements)
Copy the current immutable object with elements that replace the content ofdiffs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of diffs elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDiffResponsethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:diffs.
-
toString
public String toString()
Prints the immutable valueDiffResponsewith attribute values.
-
copyOf
public static ImmutableDiffResponse copyOf(DiffResponse instance)
Creates an immutable copy of aDiffResponsevalue. 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 DiffResponse instance
-
builder
public static ImmutableDiffResponse.Builder builder()
Creates a builder forImmutableDiffResponse.ImmutableDiffResponse.builder() .addDiffs|addAllDiffs(org.projectnessie.model.DiffResponse.DiffEntry) //diffselements .build();- Returns:
- A new ImmutableDiffResponse builder
-
-