Interface FileChange

    • Method Detail

      • getOldFile

        java.util.Optional<VCSFile> getOldFile()
        Returns the file as it was like when its corresponding revision was checked out by VCSEngine.next().
        Returns:
        The old state of the file or an empty Optional if this FileChange is an addition (FileChange.Type.ADD).
      • computeLineDelta

        default int computeLineDelta()
                              throws java.io.IOException
        Returns the delta of the changed lines. A positive value indicates that more lines have been inserted than deleted, whereas a negative value indicates that more lines have been deleted than inserted. 0 indicates that an equal amount of lines have been inserted and deleted.
        Returns:
        The delta of the changed lines.
        Throws:
        BinaryFileException - If the old or the new file is binary (see VCSFile.isBinary()).
        java.io.IOException - If an error occurred while computing the diff (see computeDiff()).