Package io.vavr
Class API.ForLazy3Validation<L,T1,T2,T3>
java.lang.Object
io.vavr.API.ForLazy3Validation<L,T1,T2,T3>
- Type Parameters:
L- the common left-hand type of all ValidationsT1- the component type of the 1st ValidationT2- the component type of the 2nd ValidationT3- the component type of the 3rd Validation
- Enclosing class:
API
A lazily evaluated
For-comprehension with three Validations.
Constructed via For(...) and evaluated by calling yield(...).
Construction is side-effect free; underlying Validations are traversed
only when yield(...) is invoked.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateForLazy3Validation(Validation<L, T1> ts1, Function1<? super T1, Validation<L, T2>> ts2, Function2<? super T1, ? super T2, Validation<L, T3>> ts3) -
Method Summary
-
Field Details
-
ts1
-
ts2
-
ts3
-
-
Constructor Details
-
ForLazy3Validation
private ForLazy3Validation(Validation<L, T1> ts1, Function1<? super T1, Validation<L, T2>> ts2, Function2<? super T1, ? super T2, Validation<L, T3>> ts3)
-
-
Method Details
-
yield
public <R> Validation<L,R> yield(@NonNull Function3<? super T1, ? super T2, ? super T3, ? extends R> f) Produces results by mapping the Cartesian product of all bound values.Evaluation is lazy and delegated to the underlying Validations by composing
flatMapandmapchains.- Type Parameters:
R- the element type of the resultingValidation- Parameters:
f- a function mapping a tuple of bound values to a result- Returns:
- an
Validationcontaining mapped results - Throws:
NullPointerException- iffisnull
-