Package io.jenkins.plugins.trunk.model
Class ImmutableRepo
java.lang.Object
io.jenkins.plugins.trunk.model.ImmutableRepo
- All Implemented Interfaces:
Repo
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableRepo
extends Object
implements Repo
Immutable implementation of
Repo.
Use the builder to create immutable instances:
ImmutableRepo.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableRepo.Builderbuilder()Creates a builder forImmutableRepo.static ImmutableRepoCreates an immutable copy of aRepovalue.booleanThis instance is equal to all instances ofImmutableRepothat have equal attribute values.inthashCode()Computes a hash code from attributes:host,owner,name.host()name()owner()toString()Prints the immutable valueRepowith attribute values.final ImmutableRepoCopy the current immutable object by setting a value for thehostattribute.final ImmutableRepoCopy the current immutable object by setting a value for thenameattribute.final ImmutableRepoCopy the current immutable object by setting a value for theownerattribute.
-
Method Details
-
host
-
owner
-
name
-
withHost
Copy the current immutable object by setting a value for thehostattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for host- Returns:
- A modified copy of the
thisobject
-
withOwner
Copy the current immutable object by setting a value for theownerattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for owner- Returns:
- A modified copy of the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableRepothat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:host,owner,name. -
toString
Prints the immutable valueRepowith attribute values. -
copyOf
Creates an immutable copy of aRepovalue. 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 Repo instance
-
builder
Creates a builder forImmutableRepo.ImmutableRepo.builder() .host(String) // requiredhost.owner(String) // requiredowner.name(String) // requiredname.build();- Returns:
- A new ImmutableRepo builder
-