public static interface ElementSelectors.ConditionalSelectorBuilder
ElementSelectors by combining simpler blocks.
All when*s are consulted in order and if one returns
true then the associated ElementSelector is
used. If all of the, return false, the default set up
with elseUse if any is used.
| Modifier and Type | Method and Description |
|---|---|
ElementSelector |
build()
Builds a conditional ElementSelector.
|
ElementSelectors.ConditionalSelectorBuilder |
elseUse(ElementSelector es)
Assigns a default ElementSelector that is used if all
whens have returned false. |
ElementSelectors.ConditionalSelectorBuilderThen |
when(Predicate<? super Element> predicate)
Sets up a conditional ElementSelector.
|
ElementSelectors.ConditionalSelectorBuilderThen |
whenElementIsNamed(QName expectedName)
Sets up a conditional ElementSelector.
|
ElementSelectors.ConditionalSelectorBuilderThen |
whenElementIsNamed(String expectedName)
Sets up a conditional ElementSelector.
|
ElementSelectors.ConditionalSelectorBuilderThen when(Predicate<? super Element> predicate)
predicate - the condition that must hold trueElementSelectors.ConditionalSelectorBuilderThen whenElementIsNamed(String expectedName)
expectedName - expected name of the control elementElementSelectors.ConditionalSelectorBuilderThen whenElementIsNamed(QName expectedName)
expectedName - expected name of the control elementElementSelectors.ConditionalSelectorBuilder elseUse(ElementSelector es)
whens have returned false.es - the default ElementSelector to fall back toElementSelector build()
Copyright © 2001–2025 XMLUnit. All rights reserved.