com.sun.tdk.specdiff.assertdiff

## Class DefaultAnalyzer

- java.lang.Object
- - com.sun.tdk.specdiff.assertdiff.DefaultAnalyzer

- All Implemented Interfaces:
    Analyzer

      public class DefaultAnalyzer
      extends java.lang.Object
      implements Analyzer

  Default implementation of Analyzer. Designed to be easily overridden to alter the behavior.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.sun.tdk.specdiff.assertdiff.Analyzer

      `Analyzer.Conclusion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultAnalyzer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Analyzer.Conclusion` | `analyze(AssertModel a1, AssertModel a2)` The straightforward implementation, that: checks for emptiness, checks for identities, calculates the "common ratio", makes the decision based on criteria.
    `protected boolean` | `areIdentical(AssertModel a1, AssertModel a2)` Returns true if two given assertions are identical.
    `protected int` | `findCommonWords(java.util.List<java.lang.String> text1, java.util.List<java.lang.String> text2)` Returns the number of common words in two lists.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultAnalyzer

          public DefaultAnalyzer()

  - ### Method Detail

    - #### analyze

          public Analyzer.Conclusion analyze(AssertModel a1,
                                             AssertModel a2)

      The straightforward implementation, that: checks for emptiness, checks for identities, calculates the "common ratio", makes the decision based on criteria.
      Specified by:
        `analyze` in interface `Analyzer`
      Parameters:
        `a1` - assertion from the older version
        `a2` - assertion from the newer version
      Returns:
        the decision made

    - #### areIdentical

          protected boolean areIdentical(AssertModel a1,
                                         AssertModel a2)

      Returns true if two given assertions are identical. This method trims the texts and just checks for equals.
      Parameters:
        `a1` - - old
        `a2` - - new
      Returns:
        true, if identical

    - #### findCommonWords

          protected int findCommonWords(java.util.List<java.lang.String> text1,
                                        java.util.List<java.lang.String> text2)

      Returns the number of common words in two lists.
      Parameters:
        `text1` -
        `text2` -
      Returns: