Package org.projectnessie.model
Class ImmutableUnchanged
- java.lang.Object
-
- org.projectnessie.model.ImmutableUnchanged
-
- All Implemented Interfaces:
Operation,Operation.Unchanged
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableUnchanged extends Object implements Operation.Unchanged
Immutable implementation ofOperation.Unchanged.Use the builder to create immutable instances:
ImmutableUnchanged.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableUnchanged.BuilderBuilds instances of typeImmutableUnchanged.-
Nested classes/interfaces inherited from interface org.projectnessie.model.Operation
Operation.Delete, Operation.Put, Operation.Unchanged
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableUnchanged.Builderbuilder()Creates a builder forImmutableUnchanged.static ImmutableUnchangedcopyOf(Operation.Unchanged instance)Creates an immutable copy of aOperation.Unchangedvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableUnchangedthat have equal attribute values.ContentKeygetKey()inthashCode()Computes a hash code from attributes:key.StringtoString()Prints the immutable valueUnchangedwith attribute values.ImmutableUnchangedwithKey(ContentKey value)Copy the current immutable object by setting a value for thekeyattribute.
-
-
-
Method Detail
-
getKey
public ContentKey getKey()
-
withKey
public final ImmutableUnchanged withKey(ContentKey value)
Copy the current immutable object by setting a value for thekeyattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for key- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableUnchangedthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:key.
-
toString
public String toString()
Prints the immutable valueUnchangedwith attribute values.
-
copyOf
public static ImmutableUnchanged copyOf(Operation.Unchanged instance)
Creates an immutable copy of aOperation.Unchangedvalue. 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 Unchanged instance
-
builder
public static ImmutableUnchanged.Builder builder()
Creates a builder forImmutableUnchanged.ImmutableUnchanged.builder() .key(org.projectnessie.model.ContentKey) // requiredkey.build();- Returns:
- A new ImmutableUnchanged builder
-
-