Package io.resys.hdes.client.api
Class ImmutableBranch
java.lang.Object
io.resys.hdes.client.api.ImmutableBranch
- All Implemented Interfaces:
HdesStore.Branch
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableBranch
extends Object
implements HdesStore.Branch
Immutable implementation of
HdesStore.Branch.
Use the builder to create immutable instances:
ImmutableBranch.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableBranch.Builderbuilder()Creates a builder forImmutableBranch.static ImmutableBranchcopyOf(HdesStore.Branch instance) Creates an immutable copy of aHdesStore.Branchvalue.booleanThis instance is equal to all instances ofImmutableBranchthat have equal attribute values.getName()inthashCode()Computes a hash code from attributes:commitId,name.toString()Prints the immutable valueBranchwith attribute values.final ImmutableBranchwithCommitId(String value) Copy the current immutable object by setting a value for thecommitIdattribute.final ImmutableBranchCopy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
getCommitId
- Specified by:
getCommitIdin interfaceHdesStore.Branch- Returns:
- The value of the
commitIdattribute
-
getName
- Specified by:
getNamein interfaceHdesStore.Branch- Returns:
- The value of the
nameattribute
-
withCommitId
Copy the current immutable object by setting a value for thecommitIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commitId- 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 ofImmutableBranchthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:commitId,name. -
toString
Prints the immutable valueBranchwith attribute values. -
copyOf
Creates an immutable copy of aHdesStore.Branchvalue. 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 Branch instance
-
builder
Creates a builder forImmutableBranch.ImmutableBranch.builder() .commitId(String) // requiredcommitId.name(String) // requiredname.build();- Returns:
- A new ImmutableBranch builder
-