Package net.jqwik.api
Interface Combinators.Combinator2<T1,T2>
- Enclosing class:
- Combinators
public static interface Combinators.Combinator2<@Nullable T1,@Nullable T2>
Combinator for two values.
-
Method Summary
Modifier and TypeMethodDescription<@Nullable R>
Arbitrary<R>as
(Combinators.F2<@Nullable T1, @Nullable T2, @Nullable R> combinator) Combine two values.filter
(Combinators.F2<@Nullable T1, @Nullable T2, Boolean> filter) Filter two values to only let them pass if the predicate is true.default <@Nullable R>
Arbitrary<R>flatAs
(Combinators.F2<@Nullable T1, @Nullable T2, Arbitrary<@Nullable R>> flatCombinator) Combine two values to create a new arbitrary.
-
Method Details
-
as
Combine two values.- Type Parameters:
R
- return type- Parameters:
combinator
- function- Returns:
- arbitrary instance
-
filter
@API(status=MAINTAINED, since="1.8.0") Combinators.Combinator2<T1,T2> filter(Combinators.F2<@Nullable T1, @Nullable T2, Boolean> filter) Filter two values to only let them pass if the predicate is true.- Parameters:
filter
- function- Returns:
- combinator instance
-
flatAs
default <@Nullable R> Arbitrary<R> flatAs(Combinators.F2<@Nullable T1, @Nullable T2, Arbitrary<@Nullable R>> flatCombinator) Combine two values to create a new arbitrary.- Type Parameters:
R
- return type of arbitrary- Parameters:
flatCombinator
- function- Returns:
- arbitrary instance
-