Package org.xmlunit.diff
Class ComparisonListenerSupport
java.lang.Object
org.xmlunit.diff.ComparisonListenerSupport
Encapsulates support for
ComparisonListener
s so it can be
reused by different implementations of DifferenceEngine
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Registers a listener that is notified of each comparison.void
Registers a listener that is notified of each comparison with outcome other thanComparisonResult.EQUAL
.void
Registers a listener that is notified of each comparison with outcomeComparisonResult.EQUAL
.void
fireComparisonPerformed
(Comparison comparison, ComparisonResult outcome) Propagates the result of a comparision to all registered listeners.
-
Constructor Details
-
ComparisonListenerSupport
public ComparisonListenerSupport()
-
-
Method Details
-
addComparisonListener
Registers a listener that is notified of each comparison.- Parameters:
l
- the listener to add
-
addMatchListener
Registers a listener that is notified of each comparison with outcomeComparisonResult.EQUAL
.- Parameters:
l
- the listener to add
-
addDifferenceListener
Registers a listener that is notified of each comparison with outcome other thanComparisonResult.EQUAL
.- Parameters:
l
- the listener to add
-
fireComparisonPerformed
Propagates the result of a comparision to all registered listeners.- Parameters:
comparison
- the comparisonoutcome
- the result of the comparison
-