Package io.resys.hdes.client.spi
Class ImmutableGitEntry
java.lang.Object
io.resys.hdes.client.spi.ImmutableGitEntry
- All Implemented Interfaces:
GitConfig.GitEntry
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableGitEntry extends Object implements GitConfig.GitEntry
Immutable implementation of
GitConfig.GitEntry.
Use the builder to create immutable instances:
ImmutableGitEntry.builder().
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableGitEntry.BuilderBuilds instances of typeImmutableGitEntry. -
Method Summary
Modifier and Type Method Description static ImmutableGitEntry.Builderbuilder()Creates a builder forImmutableGitEntry.static ImmutableGitEntrycopyOf(GitConfig.GitEntry instance)Creates an immutable copy of aGitConfig.GitEntryvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableGitEntrythat have equal attribute values.StringgetBlobHash()StringgetBlobValue()AstBody.AstBodyTypegetBodyType()com.google.common.collect.ImmutableList<AstCommand>getCommands()TimestampgetCreated()StringgetId()TimestampgetModified()StringgetRevision()StringgetTreeValue()inthashCode()Computes a hash code from attributes:id,created,modified,bodyType,revision,blobHash,treeValue,blobValue,commands.StringtoString()Prints the immutable valueGitEntrywith attribute values.ImmutableGitEntrywithBlobHash(String value)Copy the current immutable object by setting a value for theblobHashattribute.ImmutableGitEntrywithBlobValue(String value)Copy the current immutable object by setting a value for theblobValueattribute.ImmutableGitEntrywithBodyType(AstBody.AstBodyType value)Copy the current immutable object by setting a value for thebodyTypeattribute.ImmutableGitEntrywithCommands(AstCommand... elements)Copy the current immutable object with elements that replace the content ofcommands.ImmutableGitEntrywithCommands(Iterable<? extends AstCommand> elements)Copy the current immutable object with elements that replace the content ofcommands.ImmutableGitEntrywithCreated(Timestamp value)Copy the current immutable object by setting a value for thecreatedattribute.ImmutableGitEntrywithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableGitEntrywithModified(Timestamp value)Copy the current immutable object by setting a value for themodifiedattribute.ImmutableGitEntrywithRevision(String value)Copy the current immutable object by setting a value for therevisionattribute.ImmutableGitEntrywithTreeValue(String value)Copy the current immutable object by setting a value for thetreeValueattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceGitConfig.GitEntry- Returns:
- The value of the
idattribute
-
getCreated
- Specified by:
getCreatedin interfaceGitConfig.GitEntry- Returns:
- The value of the
createdattribute
-
getModified
- Specified by:
getModifiedin interfaceGitConfig.GitEntry- Returns:
- The value of the
modifiedattribute
-
getBodyType
- Specified by:
getBodyTypein interfaceGitConfig.GitEntry- Returns:
- The value of the
bodyTypeattribute
-
getRevision
- Specified by:
getRevisionin interfaceGitConfig.GitEntry- Returns:
- The value of the
revisionattribute
-
getBlobHash
- Specified by:
getBlobHashin interfaceGitConfig.GitEntry- Returns:
- The value of the
blobHashattribute
-
getTreeValue
- Specified by:
getTreeValuein interfaceGitConfig.GitEntry- Returns:
- The value of the
treeValueattribute
-
getBlobValue
- Specified by:
getBlobValuein interfaceGitConfig.GitEntry- Returns:
- The value of the
blobValueattribute
-
getCommands
- Specified by:
getCommandsin interfaceGitConfig.GitEntry- Returns:
- The value of the
commandsattribute
-
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
-
withCreated
Copy the current immutable object by setting a value for thecreatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created- Returns:
- A modified copy of the
thisobject
-
withModified
Copy the current immutable object by setting a value for themodifiedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for modified- 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
-
withRevision
Copy the current immutable object by setting a value for therevisionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for revision- 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
-
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
-
withCommands
Copy the current immutable object with elements that replace the content ofcommands.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCommands
Copy the current immutable object with elements that replace the content ofcommands. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of commands elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableGitEntrythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,created,modified,bodyType,revision,blobHash,treeValue,blobValue,commands. -
toString
Prints the immutable valueGitEntrywith attribute values. -
copyOf
Creates an immutable copy of aGitConfig.GitEntryvalue. 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 GitEntry instance
-
builder
Creates a builder forImmutableGitEntry.ImmutableGitEntry.builder() .id(String) // requiredid.created(java.sql.Timestamp) // requiredcreated.modified(java.sql.Timestamp) // requiredmodified.bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // requiredbodyType.revision(String) // requiredrevision.blobHash(String) // requiredblobHash.treeValue(String) // requiredtreeValue.blobValue(String) // requiredblobValue.addCommands|addAllCommands(io.resys.hdes.client.api.ast.AstCommand) //commandselements .build();- Returns:
- A new ImmutableGitEntry builder
-