Interface ElementSelectors.ConditionalSelectorBuilder

  • All Known Implementing Classes:
    DefaultConditionalSelectorBuilder
    Enclosing class:
    ElementSelectors

    public static interface ElementSelectors.ConditionalSelectorBuilder
    Allows to build complex 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.

    • Method Detail

      • whenElementIsNamed

        ElementSelectors.ConditionalSelectorBuilderThen whenElementIsNamed​(java.lang.String expectedName)
        Sets up a conditional ElementSelector.
        Parameters:
        expectedName - expected name of the control element
        Returns:
        a then-part setting up the ElementSelector to use
      • whenElementIsNamed

        ElementSelectors.ConditionalSelectorBuilderThen whenElementIsNamed​(javax.xml.namespace.QName expectedName)
        Sets up a conditional ElementSelector.
        Parameters:
        expectedName - expected name of the control element
        Returns:
        a then-part setting up the ElementSelector to use
      • build

        ElementSelector build()
        Builds a conditional ElementSelector.
        Returns:
        an ElementSelector adhering to the ocnfigured conditions.