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
Modifier and TypeFieldDescriptionprivate final String
The field for thegetCommitHash
record component.private final String
The field for thegetFileName
record component.private final String
The field for thegetParentCommitHash
record component. -
Constructor Summary
ConstructorDescriptionPatchReference
(String getFileName, String getCommitHash, String getParentCommitHash) Creates an instance of aPatchReference
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegetCommitHash
record component.Returns the value of thegetFileName
record component.Returns the value of thegetParentCommitHash
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
getFileName
The field for thegetFileName
record component. -
getCommitHash
The field for thegetCommitHash
record component. -
getParentCommitHash
The field for thegetParentCommitHash
record component.
-
-
Constructor Details
-
PatchReference
Creates an instance of aPatchReference
record class.- Parameters:
getFileName
- the value for thegetFileName
record componentgetCommitHash
- the value for thegetCommitHash
record componentgetParentCommitHash
- the value for thegetParentCommitHash
record 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 thegetFileName
record component.- Returns:
- the value of the
getFileName
record component
-
getCommitHash
Returns the value of thegetCommitHash
record component.- Returns:
- the value of the
getCommitHash
record component
-
getParentCommitHash
Returns the value of thegetParentCommitHash
record component.- Returns:
- the value of the
getParentCommitHash
record component
-