Package io.vavr
Class API.ForLazy5List<T1,T2,T3,T4,T5>
- java.lang.Object
-
- io.vavr.API.ForLazy5List<T1,T2,T3,T4,T5>
-
- Type Parameters:
T1- the component type of the 1st ListT2- the component type of the 2nd ListT3- the component type of the 3rd ListT4- the component type of the 4th ListT5- the component type of the 5th List
- Enclosing class:
- API
public static class API.ForLazy5List<T1,T2,T3,T4,T5> extends java.lang.ObjectA lazily evaluatedFor-comprehension with 5 Lists.Constructed via
For(...)and evaluated by callingyield(...). Construction is side-effect free; underlying Lists are traversed only whenyield(...)is invoked.
-
-
Field Summary
Fields Modifier and Type Field Description private List<T1>ts1private Function1<? super T1,List<T2>>ts2private Function2<? super T1,? super T2,List<T3>>ts3private Function3<? super T1,? super T2,? super T3,List<T4>>ts4private Function4<? super T1,? super T2,? super T3,? super T4,List<T5>>ts5
-
Constructor Summary
Constructors Modifier Constructor Description privateForLazy5List(List<T1> ts1, Function1<? super T1,List<T2>> ts2, Function2<? super T1,? super T2,List<T3>> ts3, Function3<? super T1,? super T2,? super T3,List<T4>> ts4, Function4<? super T1,? super T2,? super T3,? super T4,List<T5>> ts5)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> List<R>yield(@NonNull Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)Produces results by mapping the Cartesian product of all bound values.
-
-
-
Method Detail
-
yield
public <R> List<R> yield(@NonNull Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)
Produces results by mapping the Cartesian product of all bound values.Evaluation is lazy and delegated to the underlying Lists by composing
flatMapandmapchains.- Type Parameters:
R- the element type of the resultingList- Parameters:
f- a function mapping a tuple of bound values to a result- Returns:
- an
Listcontaining mapped results - Throws:
java.lang.NullPointerException- iffisnull
-
-