All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jooq.Rows Maven / Gradle / Ivy

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Other licenses:
 * -----------------------------------------------------------------------------
 * Commercial licenses for this work are available. These replace the above
 * Apache-2.0 and offer limited warranties, support, maintenance, and commercial
 * database integrations.
 *
 * For more information, please visit: https://www.jooq.org/legal/licensing
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
package org.jooq;

import java.util.ArrayList;
import java.util.List;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.jooq.impl.DSL;

/**
 * An auxiliary class for constructing {@link Row} collections.
 * 

* The current implementation is in draft stage. It may be changed incompatibly * in the future. Use at your own risk. * * @author Dmitry Baev * @author Lukas Eder */ public final class Rows { /** * Create a collector that can collect into an array of {@link RowN}. */ @SafeVarargs public static final Collector toRowArray( Function>... functions ) { return Collectors.collectingAndThen(toRowList(functions), l -> l.toArray(new RowN[0])); } /** * Create a collector that can collect into a list of {@link RowN}. */ @SafeVarargs public static final Collector> toRowList( Function>... functions ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(Stream.of(functions).map(f -> f.apply(t)).toArray())), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row1}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1 ) { return Collectors.collectingAndThen(toRowList(f1), l -> l.toArray(new Row1[0])); } /** * Create a collector that can collect into a list of {@link Row1}. */ public static final Collector>> toRowList( Function> f1 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row2}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2 ) { return Collectors.collectingAndThen(toRowList(f1, f2), l -> l.toArray(new Row2[0])); } /** * Create a collector that can collect into a list of {@link Row2}. */ public static final Collector>> toRowList( Function> f1, Function> f2 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row3}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3), l -> l.toArray(new Row3[0])); } /** * Create a collector that can collect into a list of {@link Row3}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row4}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4), l -> l.toArray(new Row4[0])); } /** * Create a collector that can collect into a list of {@link Row4}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row5}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5), l -> l.toArray(new Row5[0])); } /** * Create a collector that can collect into a list of {@link Row5}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row6}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6), l -> l.toArray(new Row6[0])); } /** * Create a collector that can collect into a list of {@link Row6}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row7}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7), l -> l.toArray(new Row7[0])); } /** * Create a collector that can collect into a list of {@link Row7}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row8}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8), l -> l.toArray(new Row8[0])); } /** * Create a collector that can collect into a list of {@link Row8}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row9}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9), l -> l.toArray(new Row9[0])); } /** * Create a collector that can collect into a list of {@link Row9}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row10}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10), l -> l.toArray(new Row10[0])); } /** * Create a collector that can collect into a list of {@link Row10}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row11}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11), l -> l.toArray(new Row11[0])); } /** * Create a collector that can collect into a list of {@link Row11}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row12}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12), l -> l.toArray(new Row12[0])); } /** * Create a collector that can collect into a list of {@link Row12}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row13}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13), l -> l.toArray(new Row13[0])); } /** * Create a collector that can collect into a list of {@link Row13}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row14}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14), l -> l.toArray(new Row14[0])); } /** * Create a collector that can collect into a list of {@link Row14}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t), f14.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row15}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15), l -> l.toArray(new Row15[0])); } /** * Create a collector that can collect into a list of {@link Row15}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t), f14.apply(t), f15.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row16}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16), l -> l.toArray(new Row16[0])); } /** * Create a collector that can collect into a list of {@link Row16}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t), f14.apply(t), f15.apply(t), f16.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row17}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17), l -> l.toArray(new Row17[0])); } /** * Create a collector that can collect into a list of {@link Row17}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t), f14.apply(t), f15.apply(t), f16.apply(t), f17.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row18}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18), l -> l.toArray(new Row18[0])); } /** * Create a collector that can collect into a list of {@link Row18}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t), f14.apply(t), f15.apply(t), f16.apply(t), f17.apply(t), f18.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row19}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18, Function> f19 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19), l -> l.toArray(new Row19[0])); } /** * Create a collector that can collect into a list of {@link Row19}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18, Function> f19 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t), f14.apply(t), f15.apply(t), f16.apply(t), f17.apply(t), f18.apply(t), f19.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row20}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18, Function> f19, Function> f20 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20), l -> l.toArray(new Row20[0])); } /** * Create a collector that can collect into a list of {@link Row20}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18, Function> f19, Function> f20 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t), f14.apply(t), f15.apply(t), f16.apply(t), f17.apply(t), f18.apply(t), f19.apply(t), f20.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row21}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18, Function> f19, Function> f20, Function> f21 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20, f21), l -> l.toArray(new Row21[0])); } /** * Create a collector that can collect into a list of {@link Row21}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18, Function> f19, Function> f20, Function> f21 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t), f14.apply(t), f15.apply(t), f16.apply(t), f17.apply(t), f18.apply(t), f19.apply(t), f20.apply(t), f21.apply(t))), listCombiner() ); } /** * Create a collector that can collect into an array of {@link Row22}. */ @SuppressWarnings("unchecked") public static final Collector[]> toRowArray( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18, Function> f19, Function> f20, Function> f21, Function> f22 ) { return Collectors.collectingAndThen(toRowList(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20, f21, f22), l -> l.toArray(new Row22[0])); } /** * Create a collector that can collect into a list of {@link Row22}. */ public static final Collector>> toRowList( Function> f1, Function> f2, Function> f3, Function> f4, Function> f5, Function> f6, Function> f7, Function> f8, Function> f9, Function> f10, Function> f11, Function> f12, Function> f13, Function> f14, Function> f15, Function> f16, Function> f17, Function> f18, Function> f19, Function> f20, Function> f21, Function> f22 ) { return Collector.of( ArrayList::new, (l, t) -> l.add(DSL.row(f1.apply(t), f2.apply(t), f3.apply(t), f4.apply(t), f5.apply(t), f6.apply(t), f7.apply(t), f8.apply(t), f9.apply(t), f10.apply(t), f11.apply(t), f12.apply(t), f13.apply(t), f14.apply(t), f15.apply(t), f16.apply(t), f17.apply(t), f18.apply(t), f19.apply(t), f20.apply(t), f21.apply(t), f22.apply(t))), listCombiner() ); } private static final BinaryOperator> listCombiner() { return (t1, t2) -> { t1.addAll(t2); return t1; }; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy