Package org.projectnessie.model
Class ImmutableOperations
- java.lang.Object
-
- org.projectnessie.model.ImmutableOperations
-
- All Implemented Interfaces:
Operations
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableOperations extends Object implements Operations
Immutable implementation ofOperations.Use the builder to create immutable instances:
ImmutableOperations.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableOperations.BuilderBuilds instances of typeImmutableOperations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableOperations.Builderbuilder()Creates a builder forImmutableOperations.static ImmutableOperationscopyOf(Operations instance)Creates an immutable copy of aOperationsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableOperationsthat have equal attribute values.CommitMetagetCommitMeta()List<Operation>getOperations()inthashCode()Returns a precomputed-on-construction hash code from attributes:commitMeta,operations.StringtoString()Prints the immutable valueOperationswith attribute values.ImmutableOperationswithCommitMeta(CommitMeta value)Copy the current immutable object by setting a value for thecommitMetaattribute.ImmutableOperationswithOperations(Iterable<? extends Operation> elements)Copy the current immutable object with elements that replace the content ofoperations.ImmutableOperationswithOperations(Operation... elements)Copy the current immutable object with elements that replace the content ofoperations.
-
-
-
Method Detail
-
getCommitMeta
public CommitMeta getCommitMeta()
- Specified by:
getCommitMetain interfaceOperations- Returns:
- The value of the
commitMetaattribute
-
getOperations
public List<Operation> getOperations()
- Specified by:
getOperationsin interfaceOperations- Returns:
- The value of the
operationsattribute
-
withCommitMeta
public final ImmutableOperations 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
-
withOperations
public final ImmutableOperations withOperations(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 ImmutableOperations withOperations(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 ofImmutableOperationsthat have equal attribute values.
-
hashCode
public int hashCode()
Returns a precomputed-on-construction hash code from attributes:commitMeta,operations.
-
toString
public String toString()
Prints the immutable valueOperationswith attribute values.
-
copyOf
public static ImmutableOperations copyOf(Operations instance)
Creates an immutable copy of aOperationsvalue. 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 Operations instance
-
builder
public static ImmutableOperations.Builder builder()
Creates a builder forImmutableOperations.ImmutableOperations.builder() .commitMeta(org.projectnessie.model.CommitMeta) // requiredcommitMeta.addOperations|addAllOperations(org.projectnessie.model.Operation) //operationselements .build();- Returns:
- A new ImmutableOperations builder
-
-