Class TextDifferenceListenerBase
java.lang.Object
org.custommonkey.xmlunit.examples.TextDifferenceListenerBase
- All Implemented Interfaces:
DifferenceListener
- Direct Known Subclasses:
CaseInsensitiveDifferenceListener,FloatingPointTolerantDifferenceListener
Base class that delegates all differences to another DifferenceListener.
Subclasses get a chance to hook into special methods that will be invoked for differences in textual values of attributes, CDATA sections, Text or comment nodes.
-
Field Summary
FieldsFields inherited from interface org.custommonkey.xmlunit.DifferenceListener
RETURN_ACCEPT_DIFFERENCE, RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL, RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR, RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTextDifferenceListenerBase(DifferenceListener delegateTo) -
Method Summary
Modifier and TypeMethodDescriptionprotected intDelegates totextualDifference.protected intDelegates totextualDifference.protected intDelegates totextualDifference.intdifferenceFound(Difference difference) Delegates to the nested DifferenceListener unless the Difference is of typeATTR_VALUE_ID,CDATA_VALUE_ID,COMMENT_VALUE_IDorTEXT_VALUE_ID- for those special differencesattributeDifference,cdataDifference,commentDifferenceortextDifferenceare invoked respectively.voidskippedComparison(Node control, Node test) Receive notification that a comparison between 2 nodes has been skipped because the node types are not comparable by the DifferenceEngineprotected intDelegates totextualDifference.protected intDelegates to the nested DifferenceListener.
-
Field Details
-
delegateTo
-
-
Constructor Details
-
TextDifferenceListenerBase
-
-
Method Details
-
differenceFound
Delegates to the nested DifferenceListener unless the Difference is of typeATTR_VALUE_ID,CDATA_VALUE_ID,COMMENT_VALUE_IDorTEXT_VALUE_ID- for those special differencesattributeDifference,cdataDifference,commentDifferenceortextDifferenceare invoked respectively.- Specified by:
differenceFoundin interfaceDifferenceListener- Parameters:
difference- a Difference instance as defined inDifferenceConstantsdescribing the cause of the difference and containing the detail of the nodes that differ- Returns:
- int one of the RETURN_... constants describing how this difference was interpreted
-
attributeDifference
Delegates totextualDifference. -
cdataDifference
Delegates totextualDifference. -
commentDifference
Delegates totextualDifference. -
textDifference
Delegates totextualDifference. -
textualDifference
Delegates to the nested DifferenceListener. -
skippedComparison
Description copied from interface:DifferenceListenerReceive notification that a comparison between 2 nodes has been skipped because the node types are not comparable by the DifferenceEngine- Specified by:
skippedComparisonin interfaceDifferenceListener- Parameters:
control- the control node being comparedtest- the test node being compared- See Also:
-