/** * Sets the 2nd element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 2nd element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update2(T2 value) { return new Tuple7<>(_1, value, _3, _4, _5, _6, _7); }
/** * Sets the 7th element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 7th element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update7(T7 value) { return new Tuple7<>(_1, _2, _3, _4, _5, _6, value); }
/** * Sets the 4th element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 4th element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update4(T4 value) { return new Tuple7<>(_1, _2, _3, value, _5, _6, _7); }
/** * Sets the 3rd element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 3rd element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update3(T3 value) { return new Tuple7<>(_1, _2, value, _4, _5, _6, _7); }
/** * Sets the 5th element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 5th element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update5(T5 value) { return new Tuple7<>(_1, _2, _3, _4, value, _6, _7); }
/** * Sets the 1st element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 1st element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update1(T1 value) { return new Tuple7<>(value, _2, _3, _4, _5, _6, _7); }
/** * Sets the 6th element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 6th element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update6(T6 value) { return new Tuple7<>(_1, _2, _3, _4, _5, value, _7); }
/** * Creates a tuple of 7 elements. * * @param <T1> type of the 1st element * @param <T2> type of the 2nd element * @param <T3> type of the 3rd element * @param <T4> type of the 4th element * @param <T5> type of the 5th element * @param <T6> type of the 6th element * @param <T7> type of the 7th element * @param t1 the 1st element * @param t2 the 2nd element * @param t3 the 3rd element * @param t4 the 4th element * @param t5 the 5th element * @param t6 the 6th element * @param t7 the 7th element * @return a tuple of 7 elements. */ static <T1, T2, T3, T4, T5, T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { return new Tuple7<>(t1, t2, t3, t4, t5, t6, t7); }
/** * Turns a sequence of {@code Tuple7} into a Tuple7 of {@code Seq}s. * * @param <T1> 1st component type * @param <T2> 2nd component type * @param <T3> 3rd component type * @param <T4> 4th component type * @param <T5> 5th component type * @param <T6> 6th component type * @param <T7> 7th component type * @param tuples an {@code Iterable} of tuples * @return a tuple of 7 {@link Seq}s. */ static <T1, T2, T3, T4, T5, T6, T7> Tuple7<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>, Seq<T7>> sequence7(Iterable<? extends Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7>> tuples) { Objects.requireNonNull(tuples, "tuples is null"); final Stream<Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7>> s = Stream.ofAll(tuples); return new Tuple7<>(s.map(Tuple7::_1), s.map(Tuple7::_2), s.map(Tuple7::_3), s.map(Tuple7::_4), s.map(Tuple7::_5), s.map(Tuple7::_6), s.map(Tuple7::_7)); }
/** * Sets the 5th element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 5th element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update5(T5 value) { return new Tuple7<>(_1, _2, _3, _4, value, _6, _7); }
/** * Sets the 6th element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 6th element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update6(T6 value) { return new Tuple7<>(_1, _2, _3, _4, _5, value, _7); }
/** * Sets the 2nd element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 2nd element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update2(T2 value) { return new Tuple7<>(_1, value, _3, _4, _5, _6, _7); }
/** * Sets the 7th element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 7th element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update7(T7 value) { return new Tuple7<>(_1, _2, _3, _4, _5, _6, value); }
/** * Sets the 1st element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 1st element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update1(T1 value) { return new Tuple7<>(value, _2, _3, _4, _5, _6, _7); }
/** * Sets the 3rd element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 3rd element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update3(T3 value) { return new Tuple7<>(_1, _2, value, _4, _5, _6, _7); }
/** * Sets the 4th element of this tuple to the given {@code value}. * * @param value the new value * @return a copy of this tuple with a new value for the 4th element of this Tuple. */ public Tuple7<T1, T2, T3, T4, T5, T6, T7> update4(T4 value) { return new Tuple7<>(_1, _2, _3, value, _5, _6, _7); }
/** * Creates a tuple of 7 elements. * * @param <T1> type of the 1st element * @param <T2> type of the 2nd element * @param <T3> type of the 3rd element * @param <T4> type of the 4th element * @param <T5> type of the 5th element * @param <T6> type of the 6th element * @param <T7> type of the 7th element * @param t1 the 1st element * @param t2 the 2nd element * @param t3 the 3rd element * @param t4 the 4th element * @param t5 the 5th element * @param t6 the 6th element * @param t7 the 7th element * @return a tuple of 7 elements. */ static <T1, T2, T3, T4, T5, T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { return new Tuple7<>(t1, t2, t3, t4, t5, t6, t7); }
/** * Turns a sequence of {@code Tuple7} into a Tuple7 of {@code Seq}s. * * @param <T1> 1st component type * @param <T2> 2nd component type * @param <T3> 3rd component type * @param <T4> 4th component type * @param <T5> 5th component type * @param <T6> 6th component type * @param <T7> 7th component type * @param tuples an {@code Iterable} of tuples * @return a tuple of 7 {@link Seq}s. */ static <T1, T2, T3, T4, T5, T6, T7> Tuple7<Seq<T1>, Seq<T2>, Seq<T3>, Seq<T4>, Seq<T5>, Seq<T6>, Seq<T7>> sequence7(Iterable<? extends Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7>> tuples) { Objects.requireNonNull(tuples, "tuples is null"); final Stream<Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7>> s = Stream.ofAll(tuples); return new Tuple7<>(s.map(Tuple7::_1), s.map(Tuple7::_2), s.map(Tuple7::_3), s.map(Tuple7::_4), s.map(Tuple7::_5), s.map(Tuple7::_6), s.map(Tuple7::_7)); }