Class CompareTemplateOutputHandler.DifferenceDescription

    • 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 found
        differenceMessage - Message describing the differences
        differences - 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 difference
        token - Token causing the difference
        msg - Message for the difference
        text - Template text being compared to
        rule - Template rule where difference was found
        lastOptionalDifference - The difference for the last optional difference that failed