Interface DifferenceEngineConfigurer<D extends DifferenceEngineConfigurer<D>>

    • Method Detail

      • withComparisonController

        D withComparisonController​(ComparisonController comparisonController)
        Replace the ComparisonControllers.Default with your own ComparisonController.

        Example use:

              .withComparisonController(ComparisonControllers.StopWhenDifferent)
         

        This overwrites any ComparisonController set via earlier invocations of withComparisonController.

        Parameters:
        comparisonController - ComparisonController to use
        Returns:
        this
      • withNamespaceContext

        D withNamespaceContext​(java.util.Map<java.lang.String,​java.lang.String> prefix2Uri)
        Establish a namespace context that will be used in Comparison.Detail#getXPath.

        Without a namespace context (or with an empty context) the XPath expressions will only use local names for elements and attributes.

        This overwrites any Map set via earlier invocations of withNamespaceContext.

        Parameters:
        prefix2Uri - mapping between prefix and namespace URI
        Returns:
        this
      • withAttributeFilter

        D withAttributeFilter​(Predicate<org.w3c.dom.Attr> attributeFilter)
        Registers a filter for attributes.

        Only attributes for which the predicate returns true are part of the comparison. By default all attributes are considered.

        The "special" namespace, namespace-location and schema-instance-type attributes can not be ignored this way. If you want to suppress comparison of them you'll need to implement DifferenceEvaluator.

        This overwrites any Predicate set via earlier invocations of withAttributeFilter.

        Parameters:
        attributeFilter - attribute filter to use
        Returns:
        this
      • withNodeFilter

        D withNodeFilter​(Predicate<org.w3c.dom.Node> nodeFilter)
        Registers a filter for nodes.

        Only nodes for which the predicate returns true are part of the comparison. By default nodes that are not document types are considered.

        This overwrites any Predicate set via earlier invocations of withNodeFilter.

        Parameters:
        nodeFilter - node filter to use
        Returns:
        this
      • withComparisonFormatter

        D withComparisonFormatter​(ComparisonFormatter formatter)
        Sets a non-default formatter for the differences found.

        This overwrites any ComparisonFormatter set via earlier invocations of withComparisonFormatter.

        Parameters:
        formatter - formatter to use
        Returns:
        this