Class ComparisonListenerSupport

java.lang.Object
org.xmlunit.diff.ComparisonListenerSupport

public class ComparisonListenerSupport extends Object
Encapsulates support for ComparisonListeners so it can be reused by different implementations of DifferenceEngine.
  • Constructor Details

    • ComparisonListenerSupport

      public ComparisonListenerSupport()
  • Method Details

    • addComparisonListener

      public void addComparisonListener(ComparisonListener l)
      Registers a listener that is notified of each comparison.
      Parameters:
      l - the listener to add
    • addMatchListener

      public void addMatchListener(ComparisonListener l)
      Registers a listener that is notified of each comparison with outcome ComparisonResult.EQUAL.
      Parameters:
      l - the listener to add
    • addDifferenceListener

      public void addDifferenceListener(ComparisonListener l)
      Registers a listener that is notified of each comparison with outcome other than ComparisonResult.EQUAL.
      Parameters:
      l - the listener to add
    • fireComparisonPerformed

      public void fireComparisonPerformed(Comparison comparison, ComparisonResult outcome)
      Propagates the result of a comparision to all registered listeners.
      Parameters:
      comparison - the comparison
      outcome - the result of the comparison