Package org.xmlunit.diff
Interface ElementSelectors.ConditionalSelectorBuilder
-
- All Known Implementing Classes:
DefaultConditionalSelectorBuilder
- Enclosing class:
- ElementSelectors
public static interface ElementSelectors.ConditionalSelectorBuilderAllows to build complexElementSelectors by combining simpler blocks.All
when*s are consulted in order and if one returnstruethen the associatedElementSelectoris used. If all of the, returnfalse, the default set up withelseUseif any is used.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ElementSelectorbuild()Builds a conditional ElementSelector.ElementSelectors.ConditionalSelectorBuilderelseUse(ElementSelector es)Assigns a default ElementSelector that is used if allwhens have returned false.ElementSelectors.ConditionalSelectorBuilderThenwhen(Predicate<? super org.w3c.dom.Element> predicate)Sets up a conditional ElementSelector.ElementSelectors.ConditionalSelectorBuilderThenwhenElementIsNamed(java.lang.String expectedName)Sets up a conditional ElementSelector.ElementSelectors.ConditionalSelectorBuilderThenwhenElementIsNamed(javax.xml.namespace.QName expectedName)Sets up a conditional ElementSelector.
-
-
-
Method Detail
-
when
ElementSelectors.ConditionalSelectorBuilderThen when(Predicate<? super org.w3c.dom.Element> predicate)
Sets up a conditional ElementSelector.
-
whenElementIsNamed
ElementSelectors.ConditionalSelectorBuilderThen whenElementIsNamed(java.lang.String expectedName)
Sets up a conditional ElementSelector.
-
whenElementIsNamed
ElementSelectors.ConditionalSelectorBuilderThen whenElementIsNamed(javax.xml.namespace.QName expectedName)
Sets up a conditional ElementSelector.
-
elseUse
ElementSelectors.ConditionalSelectorBuilder elseUse(ElementSelector es)
Assigns a default ElementSelector that is used if allwhens have returned false.
-
build
ElementSelector build()
Builds a conditional ElementSelector.
-
-