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.List<String>getHashesToTransplant()inthashCode()Returns a precomputed-on-construction hash code from attributes:hashesToTransplant.StringtoString()Prints the immutable valueTransplantwith attribute values.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
-
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
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableTransplantthat have equal attribute values.
-
hashCode
public int hashCode()
Returns a precomputed-on-construction hash code from attributes:hashesToTransplant.
-
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 .build();- Returns:
- A new ImmutableTransplant builder
-
-