Record Class PatchReference
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.diff.git.PatchReference
- Record Components:
getFileName- the name of the file which was modifiedgetCommitHash- the id of the state after the editgetParentCommitHash- the id of the state before the edit
public record PatchReference(String getFileName, String getCommitHash, String getParentCommitHash)
extends Record
A unique reference to a diff of a file (patch) within an unspecified repository.
- Author:
- Paul Bittner, Benjamin Moosherr
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thegetCommitHashrecord component.private final StringThe field for thegetFileNamerecord component.private final StringThe field for thegetParentCommitHashrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPatchReference(String getFileName, String getCommitHash, String getParentCommitHash) Creates an instance of aPatchReferencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegetCommitHashrecord component.Returns the value of thegetFileNamerecord component.Returns the value of thegetParentCommitHashrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
getFileName
The field for thegetFileNamerecord component. -
getCommitHash
The field for thegetCommitHashrecord component. -
getParentCommitHash
The field for thegetParentCommitHashrecord component.
-
-
Constructor Details
-
PatchReference
Creates an instance of aPatchReferencerecord class.- Parameters:
getFileName- the value for thegetFileNamerecord componentgetCommitHash- the value for thegetCommitHashrecord componentgetParentCommitHash- the value for thegetParentCommitHashrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
getFileName
Returns the value of thegetFileNamerecord component.- Returns:
- the value of the
getFileNamerecord component
-
getCommitHash
Returns the value of thegetCommitHashrecord component.- Returns:
- the value of the
getCommitHashrecord component
-
getParentCommitHash
Returns the value of thegetParentCommitHashrecord component.- Returns:
- the value of the
getParentCommitHashrecord component
-