Record Class OriginalDiff
java.lang.Object
java.lang.Record
org.variantsync.studies.evolution.simulation.diff.components.OriginalDiff
- Record Components:
fileDiffs- The differences of the changed files.
- All Implemented Interfaces:
IDiffComponent
A OriginalDiff holds the difference between two versions of a software project. The difference is represented by the
patches of all changed files. The patches are grouped by file and represented by FileDiff objects.
Each FileDiff contains the patches made to a specific file as specified by UNIX diff.
-
Constructor Summary
ConstructorsConstructorDescriptionOriginalDiff(List<FileDiff> fileDiffs) Creates an instance of aOriginalDiffrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefileDiffsrecord component.final inthashCode()Returns a hash code value for this object.booleanisEmpty()toLines()Parse this component back into a list of lines that can be added to a diff file meant as input for unix patchfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OriginalDiff
Creates an instance of aOriginalDiffrecord class.- Parameters:
fileDiffs- the value for thefileDiffsrecord component
-
-
Method Details
-
toLines
Description copied from interface:IDiffComponentParse this component back into a list of lines that can be added to a diff file meant as input for unix patch- Specified by:
toLinesin interfaceIDiffComponent- Returns:
- the lines of the part of the diff that this component represents
-
isEmpty
public boolean isEmpty() -
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). -
fileDiffs
Returns the value of thefileDiffsrecord component.- Returns:
- the value of the
fileDiffsrecord component
-