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

public record OriginalDiff(List<FileDiff> fileDiffs) extends Record implements 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

    Constructors
    Constructor
    Description
    Creates an instance of a OriginalDiff record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the fileDiffs record component.
    final int
    Returns a hash code value for this object.
    boolean
     
    Parse this component back into a list of lines that can be added to a diff file meant as input for unix patch
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OriginalDiff

      public OriginalDiff(List<FileDiff> fileDiffs)
      Creates an instance of a OriginalDiff record class.
      Parameters:
      fileDiffs - the value for the fileDiffs record component
  • Method Details

    • toLines

      public List<String> toLines()
      Description copied from interface: IDiffComponent
      Parse this component back into a list of lines that can be added to a diff file meant as input for unix patch
      Specified by:
      toLines in interface IDiffComponent
      Returns:
      the lines of the part of the diff that this component represents
    • isEmpty

      public boolean isEmpty()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fileDiffs

      public List<FileDiff> fileDiffs()
      Returns the value of the fileDiffs record component.
      Returns:
      the value of the fileDiffs record component