Package net.jqwik.api.arbitraries
Interface FunctionArbitrary<F,R>
- Type Parameters:
F
- The exact functional type to generateR
- The return type of the functional interface
- All Superinterfaces:
Arbitrary<F>
Fluent interface to configure arbitraries that represent functional types
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.jqwik.api.Arbitrary
Arbitrary.ArbitraryFacade
-
Method Summary
Methods inherited from interface net.jqwik.api.Arbitrary
allValues, array, asGeneric, collect, dontShrink, edgeCases, edgeCases, edgeCases, exhaustive, exhaustive, filter, filter, fixGenSize, flatMap, forEachValue, generator, generator, generatorWithEmbeddedEdgeCases, ignoreException, ignoreException, ignoreExceptions, ignoreExceptions, injectDuplicates, injectNull, isGeneratorMemoizable, iterator, list, map, optional, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
-
Method Details
-
when
<F_ extends F> FunctionArbitrary<F_,R> when(Predicate<List<Object>> parameterCondition, Function<List<Object>, R> answer) - Type Parameters:
F_
- The exact functional type to generate. Must be same asF
- Parameters:
parameterCondition
- A predicate that's true when for the given list of parametersanswer
should be used to produce the function' resultanswer
- A function that produces a concrete answer or throws an exception- Returns:
- A new instance of function arbitrary
-