Package org.projectnessie.model
Class ImmutableTransplant
- java.lang.Object
-
- org.projectnessie.model.ImmutableTransplant
-
- All Implemented Interfaces:
Transplant
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTransplant extends Object implements Transplant
Immutable implementation ofTransplant.Use the builder to create immutable instances:
ImmutableTransplant.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTransplant.BuilderBuilds instances of typeImmutableTransplant.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTransplant.Builderbuilder()Creates a builder forImmutableTransplant.static ImmutableTransplantcopyOf(Transplant instance)Creates an immutable copy of aTransplantvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableTransplantthat have equal attribute values.StringgetFromRefName()List<String>getHashesToTransplant()inthashCode()Computes a hash code from attributes:hashesToTransplant,fromRefName.StringtoString()Prints the immutable valueTransplantwith attribute values.ImmutableTransplantwithFromRefName(String value)Copy the current immutable object by setting a value for thefromRefNameattribute.ImmutableTransplantwithHashesToTransplant(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofhashesToTransplant.ImmutableTransplantwithHashesToTransplant(String... elements)Copy the current immutable object with elements that replace the content ofhashesToTransplant.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.projectnessie.model.Transplant
checkHashes
-
-
-
-
Method Detail
-
getHashesToTransplant
public List<String> getHashesToTransplant()
- Specified by:
getHashesToTransplantin interfaceTransplant- Returns:
- The value of the
hashesToTransplantattribute
-
getFromRefName
public String getFromRefName()
- Specified by:
getFromRefNamein interfaceTransplant- Returns:
- The value of the
fromRefNameattribute
-
withHashesToTransplant
public final ImmutableTransplant withHashesToTransplant(String... elements)
Copy the current immutable object with elements that replace the content ofhashesToTransplant.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withHashesToTransplant
public final ImmutableTransplant withHashesToTransplant(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofhashesToTransplant. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of hashesToTransplant elements to set- Returns:
- A modified copy of
thisobject
-
withFromRefName
public final ImmutableTransplant 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 ofImmutableTransplantthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:hashesToTransplant,fromRefName.
-
toString
public String toString()
Prints the immutable valueTransplantwith attribute values.
-
copyOf
public static ImmutableTransplant copyOf(Transplant instance)
Creates an immutable copy of aTransplantvalue. 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 Transplant instance
-
builder
public static ImmutableTransplant.Builder builder()
Creates a builder forImmutableTransplant.ImmutableTransplant.builder() .addHashesToTransplant|addAllHashesToTransplant(String) //hashesToTransplantelements .fromRefName(String) // requiredfromRefName.build();- Returns:
- A new ImmutableTransplant builder
-
-