Package net.jqwik.api

Class Builders.BuilderCombinator<B>

java.lang.Object
net.jqwik.api.Builders.BuilderCombinator<B>
Type Parameters:
B - The builder's type
Enclosing class:
Builders

public static class Builders.BuilderCombinator<B> extends Object
Provide access to combinators through builder functionality.

A builder is created through Builders.withBuilder(Supplier).

  • Method Details

    • use

      public <T> Builders.CombinableBuilder<B,T> use(Arbitrary<T> arbitrary)
      Use an arbitrary of type T in this builder
      Type Parameters:
      T -
      Parameters:
      arbitrary -
      Returns:
      new Builders.CombinableBuilder instance
    • build

      public <T> Arbitrary<T> build(Function<B,T> buildFunction)
      Create the final arbitrary.
      Type Parameters:
      T - the target object's type
      Parameters:
      buildFunction - Function to map a builder to an object
      Returns:
      arbitrary of target object
    • build

      public Arbitrary<B> build()
      Create the final arbitrary if it's the builder itself.
      Returns:
      arbitrary of builder
    • equals

      public boolean equals(Object o)
      Equality matters to allow memoization of resulting arbitraries
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object