Class SpdxComparer

java.lang.Object
org.spdx.utility.compare.SpdxComparer

public class SpdxComparer
extends Object
Performs a comparison between two or more SPDX documents and holds the results of the comparison The main function to perform the comparison is compare(spdxdoc1, spdxdoc2) For files, the comparison results are separated into unique files based on the file names which can be obtained by the method getUniqueFiles(index1, index2). If two documents contain files with the same name, but different data, the differences for these files can be obtained through the method getFileDifferences(index1, index2) Multi-threading considerations: This class is "mostly" threadsafe in that the calls to perform the comparison are synchronized and a flag is used to throw an error for any calls to getters when a compare is in progress. There is a small theoretical window in the getters where the compare operation is started in the middle of a get operation.
Author:
Gary O'Neall