Package net.jqwik.api

Class Combinators.CombinableBuilder<B,​T>

  • Type Parameters:
    B - The builder's type
    Enclosing class:
    Combinators

    @API(status=MAINTAINED,
         since="1.2.0")
    public static class Combinators.CombinableBuilder<B,​T>
    extends java.lang.Object
    Functionality to manipulate a builder. Instances are created through Combinators.BuilderCombinator.use(Arbitrary).
    • Method Detail

      • in

        public <C> Combinators.BuilderCombinator<C> in​(Combinators.F2<B,​T,​C> toFunction)
        Use the last provided arbitrary to change the builder object. Potentially create a different kind of builder.
        Type Parameters:
        C - Type of returned builder
        Parameters:
        toFunction - Use value provided by arbitrary to set current builder and return (potentially a different) builder.
        Returns:
        new Combinators.BuilderCombinator instance
      • inSetter

        @API(status=MAINTAINED,
             since="1.4.0")
        public Combinators.BuilderCombinator<B> inSetter​(java.util.function.BiConsumer<B,​T> setter)
        Use the last provided arbitrary to change the builder object and proceed with the same builder. The most common scenario is a builder the methods of which do not return a new builder.
        Parameters:
        setter - Use value provided by arbitrary to change a builder's property.
        Returns:
        new Combinators.BuilderCombinator instance with same embedded builder