Package org.spdx.utility.compare
Class CompareTemplateOutputHandler.DifferenceDescription
- java.lang.Object
-
- org.spdx.utility.compare.CompareTemplateOutputHandler.DifferenceDescription
-
- Enclosing class:
- CompareTemplateOutputHandler
public class CompareTemplateOutputHandler.DifferenceDescription extends Object
Information obout any difference found
-
-
Constructor Summary
Constructors Constructor Description DifferenceDescription()
Creates a different descriptionDifferenceDescription(boolean differenceFound, String differenceMessage, List<org.spdx.licenseTemplate.LineColumn> differences)
Creates a difference description
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDifference(org.spdx.licenseTemplate.LineColumn location, String token, String msg, String text, org.spdx.licenseTemplate.LicenseTemplateRule rule, CompareTemplateOutputHandler.DifferenceDescription lastOptionalDifference)
String
getDifferenceMessage()
List<org.spdx.licenseTemplate.LineColumn>
getDifferences()
boolean
isDifferenceFound()
void
setDifferenceFound(boolean differenceFound)
void
setDifferenceMessage(String differenceMessage)
void
setDifferences(List<org.spdx.licenseTemplate.LineColumn> differences)
-
-
-
Constructor Detail
-
DifferenceDescription
public DifferenceDescription(boolean differenceFound, String differenceMessage, List<org.spdx.licenseTemplate.LineColumn> differences)
Creates a difference description- Parameters:
differenceFound
- if true, a difference was founddifferenceMessage
- Message describing the differencesdifferences
- list of lines where the difference was found
-
DifferenceDescription
public DifferenceDescription()
Creates a different description
-
-
Method Detail
-
isDifferenceFound
public boolean isDifferenceFound()
- Returns:
- true if a difference is found
-
setDifferenceFound
public void setDifferenceFound(boolean differenceFound)
- Parameters:
differenceFound
- if true, a difference was found
-
getDifferenceMessage
public String getDifferenceMessage()
- Returns:
- Message describing the differences
-
setDifferenceMessage
public void setDifferenceMessage(String differenceMessage)
- Parameters:
differenceMessage
- Message describing the differences
-
getDifferences
public List<org.spdx.licenseTemplate.LineColumn> getDifferences()
- Returns:
- list of lines where the difference was found
-
setDifferences
public void setDifferences(List<org.spdx.licenseTemplate.LineColumn> differences)
- Parameters:
differences
- list of lines where the difference was found
-
addDifference
public void addDifference(org.spdx.licenseTemplate.LineColumn location, String token, String msg, String text, org.spdx.licenseTemplate.LicenseTemplateRule rule, CompareTemplateOutputHandler.DifferenceDescription lastOptionalDifference)
- Parameters:
location
- Location in the text of the differencetoken
- Token causing the differencemsg
- Message for the differencetext
- Template text being compared torule
- Template rule where difference was foundlastOptionalDifference
- The difference for the last optional difference that failed
-
-