Package io.resys.hdes.client.spi
Class ImmutableGitFile
java.lang.Object
io.resys.hdes.client.spi.ImmutableGitFile
- All Implemented Interfaces:
GitConfig.GitFile
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableGitFile extends Object implements GitConfig.GitFile
Immutable implementation of
GitConfig.GitFile.
Use the builder to create immutable instances:
ImmutableGitFile.builder().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableGitFile.BuilderBuilds instances of typeImmutableGitFile. -
Method Summary
Modifier and Type Method Description static ImmutableGitFile.Builderbuilder()Creates a builder forImmutableGitFile.static ImmutableGitFilecopyOf(GitConfig.GitFile instance)Creates an immutable copy of aGitConfig.GitFilevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableGitFilethat have equal attribute values.StringgetBlobHash()StringgetBlobValue()AstBody.AstBodyTypegetBodyType()StringgetId()StringgetTreeValue()inthashCode()Computes a hash code from attributes:id,treeValue,blobValue,blobHash,bodyType.StringtoString()Prints the immutable valueGitFilewith attribute values.ImmutableGitFilewithBlobHash(String value)Copy the current immutable object by setting a value for theblobHashattribute.ImmutableGitFilewithBlobValue(String value)Copy the current immutable object by setting a value for theblobValueattribute.ImmutableGitFilewithBodyType(AstBody.AstBodyType value)Copy the current immutable object by setting a value for thebodyTypeattribute.ImmutableGitFilewithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableGitFilewithTreeValue(String value)Copy the current immutable object by setting a value for thetreeValueattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceGitConfig.GitFile- Returns:
- The value of the
idattribute
-
getTreeValue
- Specified by:
getTreeValuein interfaceGitConfig.GitFile- Returns:
- The value of the
treeValueattribute
-
getBlobValue
- Specified by:
getBlobValuein interfaceGitConfig.GitFile- Returns:
- The value of the
blobValueattribute
-
getBlobHash
- Specified by:
getBlobHashin interfaceGitConfig.GitFile- Returns:
- The value of the
blobHashattribute
-
getBodyType
- Specified by:
getBodyTypein interfaceGitConfig.GitFile- Returns:
- The value of the
bodyTypeattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withTreeValue
Copy the current immutable object by setting a value for thetreeValueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for treeValue- Returns:
- A modified copy of the
thisobject
-
withBlobValue
Copy the current immutable object by setting a value for theblobValueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for blobValue- Returns:
- A modified copy of the
thisobject
-
withBlobHash
Copy the current immutable object by setting a value for theblobHashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for blobHash- Returns:
- A modified copy of the
thisobject
-
withBodyType
Copy the current immutable object by setting a value for thebodyTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bodyType- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableGitFilethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,treeValue,blobValue,blobHash,bodyType. -
toString
Prints the immutable valueGitFilewith attribute values. -
copyOf
Creates an immutable copy of aGitConfig.GitFilevalue. 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 GitFile instance
-
builder
Creates a builder forImmutableGitFile.ImmutableGitFile.builder() .id(String) // requiredid.treeValue(String) // requiredtreeValue.blobValue(String) // requiredblobValue.blobHash(String) // requiredblobHash.bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // requiredbodyType.build();- Returns:
- A new ImmutableGitFile builder
-