Package org.projectnessie.model
Class ImmutableMerge
- java.lang.Object
-
- org.projectnessie.model.ImmutableMerge
-
- All Implemented Interfaces:
Merge
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableMerge extends Object implements Merge
Immutable implementation ofMerge.Use the builder to create immutable instances:
ImmutableMerge.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableMerge.BuilderBuilds instances of typeImmutableMerge.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableMerge.Builderbuilder()Creates a builder forImmutableMerge.static ImmutableMergecopyOf(Merge instance)Creates an immutable copy of aMergevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableMergethat have equal attribute values.StringgetFromHash()StringgetFromRefName()inthashCode()Computes a hash code from attributes:fromHash,fromRefName.StringtoString()Prints the immutable valueMergewith attribute values.ImmutableMergewithFromHash(String value)Copy the current immutable object by setting a value for thefromHashattribute.ImmutableMergewithFromRefName(String value)Copy the current immutable object by setting a value for thefromRefNameattribute.
-
-
-
Method Detail
-
getFromHash
public String getFromHash()
- Specified by:
getFromHashin interfaceMerge- Returns:
- The value of the
fromHashattribute
-
getFromRefName
public String getFromRefName()
- Specified by:
getFromRefNamein interfaceMerge- Returns:
- The value of the
fromRefNameattribute
-
withFromHash
public final ImmutableMerge withFromHash(String value)
Copy the current immutable object by setting a value for thefromHashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for fromHash- Returns:
- A modified copy of the
thisobject
-
withFromRefName
public final ImmutableMerge withFromRefName(String value)
Copy the current immutable object by setting a value for thefromRefNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for fromRefName- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableMergethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:fromHash,fromRefName.
-
toString
public String toString()
Prints the immutable valueMergewith attribute values.
-
copyOf
public static ImmutableMerge copyOf(Merge instance)
Creates an immutable copy of aMergevalue. 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 Merge instance
-
builder
public static ImmutableMerge.Builder builder()
Creates a builder forImmutableMerge.ImmutableMerge.builder() .fromHash(String) // requiredfromHash.fromRefName(String) // requiredfromRefName.build();- Returns:
- A new ImmutableMerge builder
-
-