Class ElementNameAndAttributeQualifier

All Implemented Interfaces:

public class ElementNameAndAttributeQualifier extends ElementNameQualifier
More complex interface implementation that tests two elements for tag name and attribute name comparability.
See Also:
  • Constructor Details

    • ElementNameAndAttributeQualifier

      public ElementNameAndAttributeQualifier()
      No-args constructor: use all attributes from all elements to determine whether elements qualify for comparability
    • ElementNameAndAttributeQualifier

      public ElementNameAndAttributeQualifier(String attrName)
      Simple constructor for a single qualifying attribute name
      attrName - the value to use to qualify whether two elements can be compared further for differences
    • ElementNameAndAttributeQualifier

      public ElementNameAndAttributeQualifier(String[] attrNames)
      Extended constructor for multiple qualifying attribute names
      attrNames - the array of values to use to qualify whether two elements can be compared further for differences
  • Method Details

    • qualifyForComparison

      public boolean qualifyForComparison(Element control, Element test)
      Determine whether two elements qualify for further Difference comparison.
      Specified by:
      qualifyForComparison in interface ElementQualifier
      qualifyForComparison in class ElementNameQualifier
      control - an Element from the control XML NodeList
      test - an Element from the test XML NodeList
      true if the two elements qualify for further comparison based on both the superclass qualification (namespace URI and non- namespaced tag name), and the presence of qualifying attributes with the same values; false otherwise
    • areAttributesComparable

      @Deprecated protected final boolean areAttributesComparable(Element control, Element test)
      this method is no longer used by this class and is only kept for backwards compatibility, overriding it won't have any effect anymore
      Determine whether the qualifying attributes are present in both elements and if so whether their values are the same
      control - control element
      test - test element
      true if all qualifying attributes are present with the same values, false otherwise