Package org.xmlunit.diff
Class ComparisonListenerSupport
- java.lang.Object
-
- org.xmlunit.diff.ComparisonListenerSupport
-
public class ComparisonListenerSupport extends Object
Encapsulates support forComparisonListeners so it can be reused by different implementations ofDifferenceEngine.
-
-
Constructor Summary
Constructors Constructor Description ComparisonListenerSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddComparisonListener(ComparisonListener l)Registers a listener that is notified of each comparison.voidaddDifferenceListener(ComparisonListener l)Registers a listener that is notified of each comparison with outcome other thanComparisonResult.EQUAL.voidaddMatchListener(ComparisonListener l)Registers a listener that is notified of each comparison with outcomeComparisonResult.EQUAL.voidfireComparisonPerformed(Comparison comparison, ComparisonResult outcome)Propagates the result of a comparision to all registered listeners.
-
-
-
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 outcomeComparisonResult.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 thanComparisonResult.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 comparisonoutcome- the result of the comparison
-
-