public class AttributeValueDifferenceHandler extends DifferenceHandler
DifferenceListener which ignores the values of certain attributes.AttributeValueDifferenceHandler like this
DifferenceHandler handler = new AttributeValueDifferenceHandler("required");
the following nodes would be considered as identical:
<field name="foo" type="text" required="true"> <value>bar</value> </field>and
<field name="foo" type="text" required="false"> <value>bar</value> </field>Note
AttributeValueDifferenceHandler is getting applied to the whole document, ignoring every
Difference in the value of any attribute with the defined name. If a more precise distinction is required,
use XPathDifferenceHandler instead.RETURN_ACCEPT_DIFFERENCE, RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL, RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR, RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT| Constructor and Description |
|---|
AttributeValueDifferenceHandler(String... ignored) |
| Modifier and Type | Method and Description |
|---|---|
int |
differenceFound(Difference difference) |
skippedComparisonpublic AttributeValueDifferenceHandler(String... ignored)
ignored - name(s) of the attribute(s) to ignore the value forpublic int differenceFound(Difference difference)
differenceFound in interface DifferenceListenerdifferenceFound in class DifferenceHandlerCopyright © 2011–2021 aiticon GmbH. All rights reserved.