Class Delta
java.lang.Object
io.jenkins.plugins.forensics.delta.Delta
- All Implemented Interfaces:
Serializable
Data class that represents the code difference - so called 'delta' - between two commits.
- Author:
- Florian Orendi
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFileChanges(String fileId, FileChanges fileChange) Adds information about changes made to the specified file.booleangetFileChangesById(String fileId) Returns information about changes made to the specified file.inthashCode()
-
Constructor Details
-
Delta
Constructor for a delta instance which wraps code changes between the two passed commits.- Parameters:
currentCommit- The currently processed commitreferenceCommit- The reference commitfileChangesMap- The map which contains the changes for modified files, mapped by the file ID.
-
-
Method Details
-
getCurrentCommit
-
getReferenceCommit
-
getFileChangesMap
-
getFileChangesById
Returns information about changes made to the specified file.- Parameters:
fileId- the ID of the file- Returns:
- the information about changes made to the specified file
- Throws:
NoSuchElementException- if the file ID is not registered
-
addFileChanges
Adds information about changes made to the specified file.If there are already information about changes to the specified file, the old information will be overwritten by the new one.
- Parameters:
fileId- The ID of the filefileChange- Information about the made changes
-
equals
-
hashCode
public int hashCode()
-