Package org.projectnessie.model
Class ImmutableLogEntry
- java.lang.Object
-
- org.projectnessie.model.ImmutableLogEntry
-
- All Implemented Interfaces:
LogResponse.LogEntry
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLogEntry extends Object implements LogResponse.LogEntry
Immutable implementation ofLogResponse.LogEntry.Use the builder to create immutable instances:
ImmutableLogEntry.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLogEntry.BuilderBuilds instances of typeImmutableLogEntry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLogEntry.Builderbuilder()Creates a builder forImmutableLogEntry.static ImmutableLogEntrycopyOf(LogResponse.LogEntry instance)Creates an immutable copy of aLogResponse.LogEntryvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLogEntrythat have equal attribute values.CommitMetagetCommitMeta()List<Operation>getOperations()StringgetParentCommitHash()inthashCode()Computes a hash code from attributes:commitMeta,parentCommitHash,operations.StringtoString()Prints the immutable valueLogEntrywith attribute values.ImmutableLogEntrywithCommitMeta(CommitMeta value)Copy the current immutable object by setting a value for thecommitMetaattribute.ImmutableLogEntrywithOperations(Iterable<? extends Operation> elements)Copy the current immutable object with elements that replace the content ofoperations.ImmutableLogEntrywithOperations(Operation... elements)Copy the current immutable object with elements that replace the content ofoperations.ImmutableLogEntrywithParentCommitHash(String value)Copy the current immutable object by setting a value for theparentCommitHashattribute.
-
-
-
Method Detail
-
getCommitMeta
public CommitMeta getCommitMeta()
- Specified by:
getCommitMetain interfaceLogResponse.LogEntry- Returns:
- The value of the
commitMetaattribute
-
getParentCommitHash
@Nullable public String getParentCommitHash()
- Specified by:
getParentCommitHashin interfaceLogResponse.LogEntry- Returns:
- The value of the
parentCommitHashattribute
-
getOperations
@Nullable public List<Operation> getOperations()
- Specified by:
getOperationsin interfaceLogResponse.LogEntry- Returns:
- The value of the
operationsattribute
-
withCommitMeta
public final ImmutableLogEntry withCommitMeta(CommitMeta value)
Copy the current immutable object by setting a value for thecommitMetaattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commitMeta- Returns:
- A modified copy of the
thisobject
-
withParentCommitHash
public final ImmutableLogEntry withParentCommitHash(@Nullable String value)
Copy the current immutable object by setting a value for theparentCommitHashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for parentCommitHash (can benull)- Returns:
- A modified copy of the
thisobject
-
withOperations
public final ImmutableLogEntry withOperations(@Nullable Operation... elements)
Copy the current immutable object with elements that replace the content ofoperations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withOperations
public final ImmutableLogEntry withOperations(@Nullable Iterable<? extends Operation> elements)
Copy the current immutable object with elements that replace the content ofoperations. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of operations elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableLogEntrythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:commitMeta,parentCommitHash,operations.
-
toString
public String toString()
Prints the immutable valueLogEntrywith attribute values.
-
copyOf
public static ImmutableLogEntry copyOf(LogResponse.LogEntry instance)
Creates an immutable copy of aLogResponse.LogEntryvalue. 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 LogEntry instance
-
builder
public static ImmutableLogEntry.Builder builder()
Creates a builder forImmutableLogEntry.ImmutableLogEntry.builder() .commitMeta(org.projectnessie.model.CommitMeta) // requiredcommitMeta.parentCommitHash(String | null) // nullableparentCommitHash.operations(List<org.projectnessie.model.Operation> | null) // nullableoperations.build();- Returns:
- A new ImmutableLogEntry builder
-
-