public static interface ElementSelectors.ConditionalSelectorBuilder
ElementSelector
s 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
when s 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)
ElementSelectors.ConditionalSelectorBuilderThen whenElementIsNamed(String expectedName)
ElementSelectors.ConditionalSelectorBuilderThen whenElementIsNamed(QName expectedName)
ElementSelectors.ConditionalSelectorBuilder elseUse(ElementSelector es)
when
s have returned false.ElementSelector build()
Copyright © 2001–2017 XMLUnit. All rights reserved.