Class ComparisonListenerSupport


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

      • ComparisonListenerSupport

        public ComparisonListenerSupport()
    • Method Detail

      • 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