Package io.vavr
Class API.ForLazy7Option<T1,T2,T3,T4,T5,T6,T7>
java.lang.Object
io.vavr.API.ForLazy7Option<T1,T2,T3,T4,T5,T6,T7>
- Type Parameters:
T1- the component type of the 1st OptionT2- the component type of the 2nd OptionT3- the component type of the 3rd OptionT4- the component type of the 4th OptionT5- the component type of the 5th OptionT6- the component type of the 6th OptionT7- the component type of the 7th Option
- Enclosing class:
API
A lazily evaluated
For-comprehension with 7 Options.
Constructed via For(...) and evaluated by calling yield(...).
Construction is side-effect free; underlying Options are traversed
only when yield(...) is invoked.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateForLazy7Option(Option<T1> ts1, Function1<? super T1, Option<T2>> ts2, Function2<? super T1, ? super T2, Option<T3>> ts3, Function3<? super T1, ? super T2, ? super T3, Option<T4>> ts4, Function4<? super T1, ? super T2, ? super T3, ? super T4, Option<T5>> ts5, Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, Option<T6>> ts6, Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, Option<T7>> ts7) -
Method Summary
-
Field Details
-
ts1
-
ts2
-
ts3
-
ts4
-
ts5
-
ts6
-
ts7
-
-
Constructor Details
-
ForLazy7Option
private ForLazy7Option(Option<T1> ts1, Function1<? super T1, Option<T2>> ts2, Function2<? super T1, ? super T2, Option<T3>> ts3, Function3<? super T1, ? super T2, ? super T3, Option<T4>> ts4, Function4<? super T1, ? super T2, ? super T3, ? super T4, Option<T5>> ts5, Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, Option<T6>> ts6, Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, Option<T7>> ts7)
-
-
Method Details
-
yield
public <R> Option<R> yield(@NonNull Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R> f) Produces results by mapping the Cartesian product of all bound values.Evaluation is lazy and delegated to the underlying Options by composing
flatMapandmapchains.- Type Parameters:
R- the element type of the resultingOption- Parameters:
f- a function mapping a tuple of bound values to a result- Returns:
- an
Optioncontaining mapped results - Throws:
NullPointerException- iffisnull
-