@Test public void lazy() throws Exception { assertThat(called,equalTo(0)); assertThat(lazyT1._1(),equalTo("hello")); assertThat(called++,equalTo(1)); }
public static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> lazy(Supplier<? extends T1> supplier1, Supplier<? extends T2> supplier2, Supplier<? extends T3> supplier3, Supplier<? extends T4> supplier4, Supplier<? extends T5> supplier5) { return new Tuple5<T1,T2,T3,T4,T5>(null,null,null,null,null) { @Override public T1 _1() { return supplier1.get(); } @Override public T2 _2() { return supplier2.get(); } @Override public T3 _3() { return supplier3.get(); } @Override public T4 _4() { return supplier4.get(); } @Override public T5 _5() { return supplier5.get(); } }; }
Tuple5 implements To<Tuple5<T1,T2,T3,T4,T5>>,
                                                Serializable,
                                                Comparable<Tuple5<T1,T2,T3,T4,T5>> { public static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> lazy(Supplier<? extends T1> supplier1, Supplier<? extends T2> supplier2, Supplier<? extends T3> supplier3, Supplier<? extends T4> supplier4, Supplier<? extends T5> supplier5) { return new Tuple5<T1,T2,T3,T4,T5>(null,null,null,null,null) { @Override public T1 _1() { return supplier1.get(); } @Override public T2 _2() { return supplier2.get(); } @Override public T3 _3() { return supplier3.get(); } @Override public T4 _4() { return supplier4.get(); } @Override public T5 _5() { return supplier5.get(); } }; } }
Tuple5 implements To<Tuple5<T1,T2,T3,T4,T5>>,
                                                Serializable,
                                                Comparable<Tuple5<T1,T2,T3,T4,T5>> { public static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> lazy(Supplier<? extends T1> supplier1, Supplier<? extends T2> supplier2, Supplier<? extends T3> supplier3, Supplier<? extends T4> supplier4, Supplier<? extends T5> supplier5) { return new Tuple5<T1,T2,T3,T4,T5>(null,null,null,null,null) { @Override public T1 _1() { return supplier1.get(); } @Override public T2 _2() { return supplier2.get(); } @Override public T3 _3() { return supplier3.get(); } @Override public T4 _4() { return supplier4.get(); } @Override public T5 _5() { return supplier5.get(); } }; }  }
Tuple5 implements To<Tuple5<T1,T2,T3,T4,T5>>,
                                                Serializable,
                                                Comparable<Tuple5<T1,T2,T3,T4,T5>> { public static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> lazy(Supplier<? extends T1> supplier1, Supplier<? extends T2> supplier2, Supplier<? extends T3> supplier3, Supplier<? extends T4> supplier4, Supplier<? extends T5> supplier5) { return new Tuple5<T1,T2,T3,T4,T5>(null,null,null,null,null) { @Override public T1 _1() { return supplier1.get(); } @Override public T2 _2() { return supplier2.get(); } @Override public T3 _3() { return supplier3.get(); } @Override public T4 _4() { return supplier4.get(); } @Override public T5 _5() { return supplier5.get(); } }; }  static Tuple5<T1,T2,T3,T4,T5> of(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5); static Tuple5<T1,T2,T3,T4,T5> lazy(Supplier<? extends T1> supplier1,
                                                         Supplier<? extends T2> supplier2,
                                                         Supplier<? extends T3> supplier3,
                                                         Supplier<? extends T4> supplier4,
                                                               Supplier<? extends T5> supplier5); T1 _1(); T2 _2(); T3 _3(); T4 _4(); T5 _5(); Tuple1<T1> first(); Tuple1<T2> second(); Tuple1<T3> third(); Tuple1<T4> fourth(); Tuple1<T5> fifth(); Tuple5<T1,T2,T3,T4,T5> eager(); R1 transform(Function5<? super T1, ? super T2, ? super T3,? super T4, ? super T5, ? extends R1> fn); Tuple5<T1,T2,T3,T4,T5> memo(); Tuple5<R1,R2,R3,R4,R5> mapAll(Function<? super T1, ? extends R1> fn1, Function<? super T2,? extends R2> fn2,
                                                            Function<? super T3,? extends R3> fn3,
                                                            Function<? super T4,? extends R4> fn4,
                                                            Function<? super T5,? extends R5> fn5); Tuple5<R1,R2,R3,R4,R5> lazyMapAll(Function<? super T1, ? extends R1> fn1, Function<? super T2,? extends R2> fn2,
                                                        Function<? super T3,? extends R3> fn3,
                                                        Function<? super T4,? extends R4> fn4,
                                                              Function<? super T5,? extends R5> fn5); Tuple5<R, T2,T3,T4,T5> map1(Function<? super T1, ? extends R> fn); Tuple5<R, T2,T3,T4,T5> lazyMap1(Function<? super T1, ? extends R> fn); Tuple5<T1, R, T3, T4,T5> map2(Function<? super T2, ? extends R> fn); Tuple5<T1, R, T3,T4,T5> lazyMap2(Function<? super T2, ? extends R> fn); Tuple5<T1, T2, R,T4,T5> map3(Function<? super T3, ? extends R> fn); Tuple5<T1, T2, R,T4,T5> lazyMap3(Function<? super T3, ? extends R> fn); Tuple5<T1, T2, T3, R , T5> map4(Function<? super T4, ? extends R> fn); Tuple5<T1, T2, T3, R, T5> lazyMap4(Function<? super T4, ? extends R> fn); Tuple5<T1, T2, T3, T4 , R> map5(Function<? super T5, ? extends R> fn); Tuple5<T1, T2, T3, T4, R> lazyMap5(Function<? super T5, ? extends R> fn); R fold(Function5<? super T1, ? super T2, ? super T3,? super T4, ? super T5,? extends R> fn); @Override int compareTo(Tuple5<T1, T2, T3, T4,T5> o); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); final Object[] toArray(); Tuple6<T1, T2, T3, T4, T5, T6> concat(Tuple1<T6> tuple); Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple2<T6,T7> tuple); Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple3<T6, T7, T8> tuple); Tuple6<T1, T2, T3, T4, T5, T6> lazyConcat(Tuple1<T6> tuple); Tuple7<T1, T2, T3, T4, T5, T6, T7> lazyConcat(Tuple2<T6,T7> tuple); Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> lazyConcat(Tuple3<T6, T7, T8> tuple); }
Tuple5 implements To<Tuple5<T1,T2,T3,T4,T5>>,
                                                Serializable,
                                                Comparable<Tuple5<T1,T2,T3,T4,T5>> { public static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> lazy(Supplier<? extends T1> supplier1, Supplier<? extends T2> supplier2, Supplier<? extends T3> supplier3, Supplier<? extends T4> supplier4, Supplier<? extends T5> supplier5) { return new Tuple5<T1,T2,T3,T4,T5>(null,null,null,null,null) { @Override public T1 _1() { return supplier1.get(); } @Override public T2 _2() { return supplier2.get(); } @Override public T3 _3() { return supplier3.get(); } @Override public T4 _4() { return supplier4.get(); } @Override public T5 _5() { return supplier5.get(); } }; }  static Tuple5<T1,T2,T3,T4,T5> of(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5); static Tuple5<T1,T2,T3,T4,T5> lazy(Supplier<? extends T1> supplier1,
                                                         Supplier<? extends T2> supplier2,
                                                         Supplier<? extends T3> supplier3,
                                                         Supplier<? extends T4> supplier4,
                                                               Supplier<? extends T5> supplier5); T1 _1(); T2 _2(); T3 _3(); T4 _4(); T5 _5(); Tuple1<T1> first(); Tuple1<T2> second(); Tuple1<T3> third(); Tuple1<T4> fourth(); Tuple1<T5> fifth(); Tuple5<T1,T2,T3,T4,T5> eager(); R1 transform(Function5<? super T1, ? super T2, ? super T3,? super T4, ? super T5, ? extends R1> fn); Tuple5<T1,T2,T3,T4,T5> memo(); Tuple5<R1,R2,R3,R4,R5> mapAll(Function<? super T1, ? extends R1> fn1, Function<? super T2,? extends R2> fn2,
                                                            Function<? super T3,? extends R3> fn3,
                                                            Function<? super T4,? extends R4> fn4,
                                                            Function<? super T5,? extends R5> fn5); Tuple5<R1,R2,R3,R4,R5> lazyMapAll(Function<? super T1, ? extends R1> fn1, Function<? super T2,? extends R2> fn2,
                                                        Function<? super T3,? extends R3> fn3,
                                                        Function<? super T4,? extends R4> fn4,
                                                              Function<? super T5,? extends R5> fn5); Tuple5<R, T2,T3,T4,T5> map1(Function<? super T1, ? extends R> fn); Tuple5<R, T2,T3,T4,T5> lazyMap1(Function<? super T1, ? extends R> fn); Tuple5<T1, R, T3, T4,T5> map2(Function<? super T2, ? extends R> fn); Tuple5<T1, R, T3,T4,T5> lazyMap2(Function<? super T2, ? extends R> fn); Tuple5<T1, T2, R,T4,T5> map3(Function<? super T3, ? extends R> fn); Tuple5<T1, T2, R,T4,T5> lazyMap3(Function<? super T3, ? extends R> fn); Tuple5<T1, T2, T3, R , T5> map4(Function<? super T4, ? extends R> fn); Tuple5<T1, T2, T3, R, T5> lazyMap4(Function<? super T4, ? extends R> fn); Tuple5<T1, T2, T3, T4 , R> map5(Function<? super T5, ? extends R> fn); Tuple5<T1, T2, T3, T4, R> lazyMap5(Function<? super T5, ? extends R> fn); R fold(Function5<? super T1, ? super T2, ? super T3,? super T4, ? super T5,? extends R> fn); @Override int compareTo(Tuple5<T1, T2, T3, T4,T5> o); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); final Object[] toArray(); Tuple6<T1, T2, T3, T4, T5, T6> concat(Tuple1<T6> tuple); Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple2<T6,T7> tuple); Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple3<T6, T7, T8> tuple); Tuple6<T1, T2, T3, T4, T5, T6> lazyConcat(Tuple1<T6> tuple); Tuple7<T1, T2, T3, T4, T5, T6, T7> lazyConcat(Tuple2<T6,T7> tuple); Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> lazyConcat(Tuple3<T6, T7, T8> tuple);  }