Class ModelDiff.Result

  • Enclosing class:
    ModelDiff

    public static final class ModelDiff.Result
    extends java.lang.Object
    The result of comparing two Smithy models.
    • Constructor Summary

      Constructors 
      Constructor Description
      Result​(Differences differences, java.util.List<software.amazon.smithy.model.validation.ValidationEvent> diffEvents, java.util.List<software.amazon.smithy.model.validation.ValidationEvent> oldModelEvents, java.util.List<software.amazon.smithy.model.validation.ValidationEvent> newModelEvents)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<software.amazon.smithy.model.validation.ValidationEvent> determineIntroducedEvents()
      Gets the validation events that were introduced by whatever changes were made to the new model.
      java.util.Set<software.amazon.smithy.model.validation.ValidationEvent> determineResolvedEvents()
      Gets the validation events that were present in the old model but are no longer an issue in the new model.
      boolean equals​(java.lang.Object o)  
      Differences getDifferences()
      Gets a queryable set of differences between two models.
      java.util.List<software.amazon.smithy.model.validation.ValidationEvent> getDiffEvents()
      Gets the diff analysis as a list of ValidationEvents.
      java.util.List<software.amazon.smithy.model.validation.ValidationEvent> getNewModelEvents()
      Gets the validation events emitted when validating the new model.
      java.util.List<software.amazon.smithy.model.validation.ValidationEvent> getOldModelEvents()
      Gets the validation events emitted when validating the old model.
      int hashCode()  
      boolean isDiffBreaking()
      Determines if the diff events contain any DANGER or ERROR events.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Result

        public Result​(Differences differences,
                      java.util.List<software.amazon.smithy.model.validation.ValidationEvent> diffEvents,
                      java.util.List<software.amazon.smithy.model.validation.ValidationEvent> oldModelEvents,
                      java.util.List<software.amazon.smithy.model.validation.ValidationEvent> newModelEvents)
    • Method Detail

      • getDifferences

        public Differences getDifferences()
        Gets a queryable set of differences between two models.
        Returns:
        Returns the differences.
      • getDiffEvents

        public java.util.List<software.amazon.smithy.model.validation.ValidationEvent> getDiffEvents()
        Gets the diff analysis as a list of ValidationEvents.
        Returns:
        Returns the diff validation events.
      • getOldModelEvents

        public java.util.List<software.amazon.smithy.model.validation.ValidationEvent> getOldModelEvents()
        Gets the validation events emitted when validating the old model.
        Returns:
        Returns the old model's validation events.
      • getNewModelEvents

        public java.util.List<software.amazon.smithy.model.validation.ValidationEvent> getNewModelEvents()
        Gets the validation events emitted when validating the new model.
        Returns:
        Returns the new model's validation events.
      • determineResolvedEvents

        public java.util.Set<software.amazon.smithy.model.validation.ValidationEvent> determineResolvedEvents()
        Gets the validation events that were present in the old model but are no longer an issue in the new model.
        Returns:
        Returns the resolved validation events.
      • determineIntroducedEvents

        public java.util.Set<software.amazon.smithy.model.validation.ValidationEvent> determineIntroducedEvents()
        Gets the validation events that were introduced by whatever changes were made to the new model.
        Returns:
        Returns the validation events introduced by the new model.
      • isDiffBreaking

        public boolean isDiffBreaking()
        Determines if the diff events contain any DANGER or ERROR events.
        Returns:
        Returns true if this diff has breaking changes.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object