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

org.jooq.lambda.Seq Maven / Gradle / Ivy

Go to download

jOOλ is part of the jOOQ series (along with jOOQ, jOOX, jOOR, jOOU) providing some useful extensions to Java 8 lambdas.

There is a newer version: 0.9.15
Show newest version
/**
 * Copyright (c) 2014-2016, Data Geekery GmbH, [email protected]
 *
 * 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
 *
 *     http://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.
 */
package org.jooq.lambda;

import static java.util.Comparator.comparing;
import static java.util.Spliterator.ORDERED;
import static java.util.Spliterators.spliteratorUnknownSize;
import static org.jooq.lambda.SeqUtils.sneakyThrow;
import static org.jooq.lambda.tuple.Tuple.tuple;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.UncheckedIOException;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Queue;
import java.util.Random;
import java.util.Set;
import java.util.Spliterator;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.BiFunction;
import java.util.function.BiPredicate;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.function.ToDoubleFunction;
import java.util.function.ToIntFunction;
import java.util.function.ToLongFunction;
import java.util.function.UnaryOperator;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

import java.util.NoSuchElementException;

import javax.annotation.Generated;
import org.jooq.lambda.exception.TooManyElementsException;

import org.jooq.lambda.function.Function10;
import org.jooq.lambda.function.Function11;
import org.jooq.lambda.function.Function12;
import org.jooq.lambda.function.Function13;
import org.jooq.lambda.function.Function14;
import org.jooq.lambda.function.Function15;
import org.jooq.lambda.function.Function16;
import org.jooq.lambda.function.Function3;
import org.jooq.lambda.function.Function4;
import org.jooq.lambda.function.Function5;
import org.jooq.lambda.function.Function6;
import org.jooq.lambda.function.Function7;
import org.jooq.lambda.function.Function8;
import org.jooq.lambda.function.Function9;
import org.jooq.lambda.tuple.Tuple;
import org.jooq.lambda.tuple.Tuple1;
import org.jooq.lambda.tuple.Tuple10;
import org.jooq.lambda.tuple.Tuple11;
import org.jooq.lambda.tuple.Tuple12;
import org.jooq.lambda.tuple.Tuple13;
import org.jooq.lambda.tuple.Tuple14;
import org.jooq.lambda.tuple.Tuple15;
import org.jooq.lambda.tuple.Tuple16;
import org.jooq.lambda.tuple.Tuple2;
import org.jooq.lambda.tuple.Tuple3;
import org.jooq.lambda.tuple.Tuple4;
import org.jooq.lambda.tuple.Tuple5;
import org.jooq.lambda.tuple.Tuple6;
import org.jooq.lambda.tuple.Tuple7;
import org.jooq.lambda.tuple.Tuple8;
import org.jooq.lambda.tuple.Tuple9;


/**
 * A sequential, ordered {@link Stream} that adds all sorts of useful methods that work only because
 * it is sequential and ordered.
 *
 * @author Lukas Eder
 * @author Roman Tkalenko
 */
public interface Seq extends Stream, Iterable, Collectable {

    /**
     * The underlying {@link Stream} implementation.
     */
    Stream stream();

    /**
     * Transform this stream into a new type.
     * 

* If certain operations are re-applied frequently to streams, this * transform operation is very useful for such operations to be applied in a * fluent style: *

*

     * Function<Seq<Integer>, Seq<String>> toString = s -> s.map(Objects::toString);
     * Seq<String> strings =
     * Seq.of(1, 2, 3)
     *    .transform(toString);
     * 
*/ default U transform(Function, ? extends U> transformer) { return transformer.apply(this); } /** * Cross join 2 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ default Seq> crossJoin(Stream other) { return Seq.crossJoin(this, other); } /** * Cross join 2 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ default Seq> crossJoin(Iterable other) { return Seq.crossJoin(this, other); } /** * Cross join 2 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ default Seq> crossJoin(Seq other) { return Seq.crossJoin(this, other); } /** * Inner join 2 streams into one. *

*

     * // (tuple(1, 1), tuple(2, 2))
     * Seq.of(1, 2, 3).innerJoin(Seq.of(1, 2), t -> Objects.equals(t.v1, t.v2))
     * 
*/ default Seq> innerJoin(Stream other, BiPredicate predicate) { return innerJoin(seq(other), predicate); } /** * Inner join 2 streams into one. *

*

     * // (tuple(1, 1), tuple(2, 2))
     * Seq.of(1, 2, 3).innerJoin(Seq.of(1, 2), t -> Objects.equals(t.v1, t.v2))
     * 
*/ default Seq> innerJoin(Iterable other, BiPredicate predicate) { return innerJoin(seq(other), predicate); } /** * Inner join 2 streams into one. *

*

     * // (tuple(1, 1), tuple(2, 2))
     * Seq.of(1, 2, 3).innerJoin(Seq.of(1, 2), t -> Objects.equals(t.v1, t.v2))
     * 
*/ default Seq> innerJoin(Seq other, BiPredicate predicate) { // This algorithm isn't lazy and has substantial complexity for large argument streams! List list = other.toList(); return flatMap(t -> seq(list) .filter(u -> predicate.test(t, u)) .map(u -> tuple(t, u))) .onClose(other::close); } /** * Left outer join 2 streams into one. *

*

     * // (tuple(1, 1), tuple(2, 2), tuple(3, null))
     * Seq.of(1, 2, 3).leftOuterJoin(Seq.of(1, 2), t -> Objects.equals(t.v1, t.v2))
     * 
*/ default Seq> leftOuterJoin(Stream other, BiPredicate predicate) { return leftOuterJoin(seq(other), predicate); } /** * Left outer join 2 streams into one. *

*

     * // (tuple(1, 1), tuple(2, 2), tuple(3, null))
     * Seq.of(1, 2, 3).leftOuterJoin(Seq.of(1, 2), t -> Objects.equals(t.v1, t.v2))
     * 
*/ default Seq> leftOuterJoin(Iterable other, BiPredicate predicate) { return leftOuterJoin(seq(other), predicate); } /** * Left outer join 2 streams into one. *

*

     * // (tuple(1, 1), tuple(2, 2), tuple(3, null))
     * Seq.of(1, 2, 3).leftOuterJoin(Seq.of(1, 2), t -> Objects.equals(t.v1, t.v2))
     * 
*/ default Seq> leftOuterJoin(Seq other, BiPredicate predicate) { // This algorithm isn't lazy and has substantial complexity for large argument streams! List list = other.toList(); return flatMap(t -> seq(list) .filter(u -> predicate.test(t, u)) .onEmpty(null) .map(u -> tuple(t, u))) .onClose(other::close); } /** * Right outer join 2 streams into one. *

*

     * // (tuple(1, 1), tuple(2, 2), tuple(null, 3))
     * Seq.of(1, 2).rightOuterJoin(Seq.of(1, 2, 3), t -> Objects.equals(t.v1, t.v2))
     * 
*/ default Seq> rightOuterJoin(Stream other, BiPredicate predicate) { return rightOuterJoin(seq(other), predicate); } /** * Right outer join 2 streams into one. *

*

     * // (tuple(1, 1), tuple(2, 2), tuple(null, 3))
     * Seq.of(1, 2).rightOuterJoin(Seq.of(1, 2, 3), t -> Objects.equals(t.v1, t.v2))
     * 
*/ default Seq> rightOuterJoin(Iterable other, BiPredicate predicate) { return rightOuterJoin(seq(other), predicate); } /** * Right outer join 2 streams into one. *

*

     * // (tuple(1, 1), tuple(2, 2), tuple(null, 3))
     * Seq.of(1, 2).rightOuterJoin(Seq.of(1, 2, 3), t -> Objects.equals(t.v1, t.v2))
     * 
*/ default Seq> rightOuterJoin(Seq other, BiPredicate predicate) { return other .leftOuterJoin(this, (u, t) -> predicate.test(t, u)) .map(t -> tuple(t.v2, t.v1)) .onClose(other::close); } /** * Produce this stream, or an alternative stream from the * value, in case this stream is empty. */ default Seq onEmpty(T value) { return onEmptyGet(() -> value); } /** * Produce this stream, or an alternative stream from the * supplier, in case this stream is empty. */ default Seq onEmptyGet(Supplier supplier) { boolean[] first = { true }; return SeqUtils.transform(this, (delegate, action) -> { if (first[0]) { first[0] = false; if (!delegate.tryAdvance(action)) action.accept(supplier.get()); return true; } else { return delegate.tryAdvance(action); } }); } /** * Produce this stream, or an alternative stream from the * supplier, in case this stream is empty. */ default Seq onEmptyThrow(Supplier supplier) { boolean[] first = { true }; return SeqUtils.transform(this, (delegate, action) -> { if (first[0]) { first[0] = false; if (!delegate.tryAdvance(action)) sneakyThrow(supplier.get()); return true; } else { return delegate.tryAdvance(action); } }); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).concat(Seq.of(4, 5, 6))
     * 
* * @see #concat(Stream[]) */ default Seq concat(Stream other) { return concat(seq(other)); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).concat(Seq.of(4, 5, 6))
     * 
* * @see #concat(Stream[]) */ default Seq concat(Iterable other) { return concat(seq(other)); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).concat(Seq.of(4, 5, 6))
     * 
* * @see #concat(Stream[]) */ @SuppressWarnings({ "unchecked" }) default Seq concat(Seq other) { return Seq.concat(new Seq[]{this, other}); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4)
     * Seq.of(1, 2, 3).concat(4)
     * 
* * @see #concat(Stream[]) */ default Seq concat(T other) { return concat(Seq.of(other)); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).concat(4, 5, 6)
     * 
* * @see #concat(Stream[]) */ @SuppressWarnings({ "unchecked" }) default Seq concat(T... other) { return concat(Seq.of(other)); } /** * Concatenate an optional value. *

*

     * // (1, 2, 3, 4)
     * Seq.of(1, 2, 3).concat(Optional.of(4))
     *
     * // (1, 2, 3)
     * Seq.of(1, 2, 3).concat(Optional.empty())
     * 
*/ default Seq concat(Optional other) { return concat(Seq.seq(other)); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).append(Seq.of(4, 5, 6))
     * 
* * @see #concat(Stream[]) */ default Seq append(Stream other) { return concat(other); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).append(Seq.of(4, 5, 6))
     * 
* * @see #concat(Stream[]) */ default Seq append(Iterable other) { return concat(other); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).append(Seq.of(4, 5, 6))
     * 
* * @see #concat(Stream[]) */ @SuppressWarnings({ "unchecked" }) default Seq append(Seq other) { return concat(other); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4)
     * Seq.of(1, 2, 3).append(4)
     * 
* * @see #concat(Stream[]) */ default Seq append(T other) { return concat(other); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).append(4, 5, 6)
     * 
* * @see #concat(Stream[]) */ @SuppressWarnings({ "unchecked" }) default Seq append(T... other) { return concat(other); } /** * Concatenate an optional value. *

*

     * // (1, 2, 3, 4)
     * Seq.of(1, 2, 3).append(Optional.of(4))
     *
     * // (1, 2, 3)
     * Seq.of(1, 2, 3).append(Optional.empty())
     * 
*/ default Seq append(Optional other) { return concat(other); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(4, 5, 6).prepend(Seq.of(1, 2, 3))
     * 
* * @see #concat(Stream[]) */ default Seq prepend(Stream other) { return seq(other).concat(this); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(4, 5, 6).prepend(Seq.of(1, 2, 3))
     * 
* * @see #concat(Stream[]) */ default Seq prepend(Iterable other) { return seq(other).concat(this); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(4, 5, 6).prepend(Seq.of(1, 2, 3))
     * 
* * @see #concat(Stream[]) */ @SuppressWarnings({ "unchecked" }) default Seq prepend(Seq other) { return concat(other, this); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4)
     * Seq.of(2, 3, 4).prepend(1)
     * 
* * @see #concat(Stream[]) */ default Seq prepend(T other) { return Seq.of(other).concat(this); } /** * Concatenate two streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(4, 5, 6).prepend(Seq.of(1, 2, 3))
     * 
* * @see #concat(Stream[]) */ @SuppressWarnings({ "unchecked" }) default Seq prepend(T... other) { return Seq.of(other).concat(this); } /** * Concatenate an optional value. *

*

     * // (0, 1, 2, 3)
     * Seq.of(1, 2, 3).prepend(Optional.of(0))
     *
     * // (1, 2, 3)
     * Seq.of(1, 2, 3).prepend(Optional.empty())
     * 
*/ default Seq prepend(Optional other) { return Seq.seq(other).concat(this); } /** * Check whether this stream contains a given value. *

*

     * // true
     * Seq.of(1, 2, 3).contains(2)
     * 
*/ default boolean contains(T other) { return anyMatch(Predicate.isEqual(other)); } /** * Check whether this stream contains all given values. *

*

     * // true
     * Seq.of(1, 2, 3).containsAll(2, 3)
     * 
*/ default boolean containsAll(T... other) { return containsAll(of(other)); } /** * Check whether this stream contains all given values. *

*

     * // true
     * Seq.of(1, 2, 3).containsAll(2, 3)
     * 
*/ default boolean containsAll(Stream other) { return containsAll(seq(other)); } /** * Check whether this stream contains all given values. *

*

     * // true
     * Seq.of(1, 2, 3).containsAll(2, 3)
     * 
*/ default boolean containsAll(Iterable other) { return containsAll(seq(other)); } /** * Check whether this stream contains all given values. *

*

     * // true
     * Seq.of(1, 2, 3).containsAll(2, 3)
     * 
*/ default boolean containsAll(Seq other) { Set set = other.toSet(HashSet::new); return set.isEmpty() ? true : filter(t -> set.remove(t)).anyMatch(t -> set.isEmpty()); } /** * Check whether this stream contains any of the given values. *

*

     * // true
     * Seq.of(1, 2, 3).containsAny(2, 4)
     * 
*/ default boolean containsAny(T... other) { return containsAny(of(other)); } /** * Check whether this stream contains any of the given values. *

*

     * // true
     * Seq.of(1, 2, 3).containsAny(2, 4)
     * 
*/ default boolean containsAny(Stream other) { return containsAny(seq(other)); } /** * Check whether this stream contains any of the given values. *

*

     * // true
     * Seq.of(1, 2, 3).containsAny(2, 4)
     * 
*/ default boolean containsAny(Iterable other) { return containsAny(seq(other)); } /** * Check whether this stream contains any of the given values. *

*

     * // true
     * Seq.of(1, 2, 3).containsAny(2, 4)
     * 
*/ default boolean containsAny(Seq other) { Set set = other.toSet(HashSet::new); return set.isEmpty() ? false : anyMatch(set::contains); } /** * Get a single element from the stream at a given index. */ default Optional get(long index) { if (index < 0L) return Optional.empty(); else if (index == 0L) return findFirst(); else return skip(index).findFirst(); } /** * Get the single element from the stream, or throw an exception if the * stream holds more than one element. */ default Optional findSingle() throws TooManyElementsException { Iterator it = iterator(); if (!it.hasNext()) return Optional.empty(); T result = it.next(); if (!it.hasNext()) return Optional.of(result); throw new TooManyElementsException("Stream contained more than one element."); } /** * Get a single element from the stream given a predicate. */ default Optional findFirst(Predicate predicate) { return filter(predicate).findFirst(); } /** * Return a new stream where the first occurrence of the argument is removed. *

*

     * // 1, 3, 2, 4
     * Seq.of(1, 2, 3, 2, 4).remove(2)
     * 
*/ default Seq remove(T other) { boolean[] removed = new boolean[1]; return filter(t -> removed[0] || !(removed[0] = Objects.equals(t, other))); } /** * Return a new stream where all occurrences of the arguments are removed. *

*

     * // 1, 4
     * Seq.of(1, 2, 3, 2, 4).removeAll(2, 3)
     * 
*/ default Seq removeAll(T... other) { return removeAll(of(other)); } /** * Return a new stream where all occurrences of the arguments are removed. *

*

     * // 1, 4
     * Seq.of(1, 2, 3, 2, 4).removeAll(2, 3)
     * 
*/ default Seq removeAll(Stream other) { return removeAll(seq(other)); } /** * Return a new stream where all occurrences of the arguments are removed. *

*

     * // 1, 4
     * Seq.of(1, 2, 3, 2, 4).removeAll(2, 3)
     * 
*/ default Seq removeAll(Iterable other) { return removeAll(seq(other)); } /** * Return a new stream where all occurrences of the arguments are removed. *

*

     * // 1, 4
     * Seq.of(1, 2, 3, 2, 4).removeAll(2, 3)
     * 
*/ default Seq removeAll(Seq other) { Set set = other.toSet(HashSet::new); return set.isEmpty() ? this : filter(t -> !set.contains(t)).onClose(other::close); } /** * Return a new stream where only occurrences of the arguments are retained. *

*

     * // 2, 3, 2
     * Seq.of(1, 2, 3, 2, 4).retainAll(2, 3)
     * 
*/ default Seq retainAll(T... other) { return retainAll(of(other)); } /** * Return a new stream where only occurrences of the arguments are retained. *

*

     * // 2, 3, 2
     * Seq.of(1, 2, 3, 2, 4).retainAll(2, 3)
     * 
*/ default Seq retainAll(Stream other) { return retainAll(seq(other)); } /** * Return a new stream where only occurrences of the arguments are retained. *

*

     * // 2, 3, 2
     * Seq.of(1, 2, 3, 2, 4).retainAll(2, 3)
     * 
*/ default Seq retainAll(Iterable other) { return retainAll(seq(other)); } /** * Return a new stream where only occurrences of the arguments are retained. *

*

     * // 2, 3, 2
     * Seq.of(1, 2, 3, 2, 4).retainAll(2, 3)
     * 
*/ default Seq retainAll(Seq other) { Set set = other.toSet(HashSet::new); return set.isEmpty() ? empty() : filter(t -> set.contains(t)).onClose(other::close); } /** * Repeat a stream infinitely. *

*

     * // (1, 2, 3, 1, 2, 3, ...)
     * Seq.of(1, 2, 3).cycle();
     * 
* * @see #cycle(Stream) */ default Seq cycle() { return cycle(this); } /** * Repeat a stream a certain amount of times. *

*

     * // ()
     * Seq.of(1, 2, 3).cycle(0);
     * 
     * // (1, 2, 3)
     * Seq.of(1, 2, 3).cycle(1);
     * 
     * // (1, 2, 3, 1, 2, 3, 1, 2, 3)
     * Seq.of(1, 2, 3).cycle(3);
     * 
* * @see #cycle(Stream, long) */ default Seq cycle(long times) { return cycle(this, times); } /** * Get a stream of distinct keys. *

*

     * // (1, 2, 3)
     * Seq.of(1, 1, 2, -2, 3).distinct(Math::abs)
     * 
*/ default Seq distinct(Function keyExtractor) { final Map seen = new ConcurrentHashMap<>(); return filter(t -> seen.put(keyExtractor.apply(t), "") == null); } /** * Zip two streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
* * @see #zip(Stream, Stream) */ default Seq> zip(Stream other) { return zip(seq(other)); } /** * Zip two streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
* * @see #zip(Stream, Stream) */ default Seq> zip(Iterable other) { return zip(seq(other)); } /** * Zip two streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
* * @see #zip(Stream, Stream) */ default Seq> zip(Seq other) { return zip(this, other); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
* * @see #zip(Seq, BiFunction) */ default Seq zip(Stream other, BiFunction zipper) { return zip(seq(other), zipper); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
* * @see #zip(Seq, BiFunction) */ default Seq zip(Iterable other, BiFunction zipper) { return zip(seq(other), zipper); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
* * @see #zip(Seq, BiFunction) */ default Seq zip(Seq other, BiFunction zipper) { return zip(this, other, zipper); } // [jooq-tools] START [zip-all-static] /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, T1 default1, T2 default2) { return zipAll(s1, s2, default1, default2, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, T1 default1, T2 default2, T3 default3) { return zipAll(s1, s2, s3, default1, default2, default3, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, T1 default1, T2 default2, T3 default3, T4 default4) { return zipAll(s1, s2, s3, s4, default1, default2, default3, default4, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5) { return zipAll(s1, s2, s3, s4, s5, default1, default2, default3, default4, default5, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6) { return zipAll(s1, s2, s3, s4, s5, s6, default1, default2, default3, default4, default5, default6, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7) { return zipAll(s1, s2, s3, s4, s5, s6, s7, default1, default2, default3, default4, default5, default6, default7, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, default1, default2, default3, default4, default5, default6, default7, default8, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, default1, default2, default3, default4, default5, default6, default7, default8, default9, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15, Stream s16, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15, T16 default16) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, default16, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, T1 default1, T2 default2) { return zipAll(s1, s2, default1, default2, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, T1 default1, T2 default2, T3 default3) { return zipAll(s1, s2, s3, default1, default2, default3, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, T1 default1, T2 default2, T3 default3, T4 default4) { return zipAll(s1, s2, s3, s4, default1, default2, default3, default4, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5) { return zipAll(s1, s2, s3, s4, s5, default1, default2, default3, default4, default5, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6) { return zipAll(s1, s2, s3, s4, s5, s6, default1, default2, default3, default4, default5, default6, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7) { return zipAll(s1, s2, s3, s4, s5, s6, s7, default1, default2, default3, default4, default5, default6, default7, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, default1, default2, default3, default4, default5, default6, default7, default8, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, default1, default2, default3, default4, default5, default6, default7, default8, default9, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, Iterable s13, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, Iterable s13, Iterable s14, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, Iterable s13, Iterable s14, Iterable s15, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, Iterable s13, Iterable s14, Iterable s15, Iterable s16, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15, T16 default16) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, default16, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, T1 default1, T2 default2) { return zipAll(s1, s2, default1, default2, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, T1 default1, T2 default2, T3 default3) { return zipAll(s1, s2, s3, default1, default2, default3, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, T1 default1, T2 default2, T3 default3, T4 default4) { return zipAll(s1, s2, s3, s4, default1, default2, default3, default4, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5) { return zipAll(s1, s2, s3, s4, s5, default1, default2, default3, default4, default5, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6) { return zipAll(s1, s2, s3, s4, s5, s6, default1, default2, default3, default4, default5, default6, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7) { return zipAll(s1, s2, s3, s4, s5, s6, s7, default1, default2, default3, default4, default5, default6, default7, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, default1, default2, default3, default4, default5, default6, default7, default8, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, default1, default2, default3, default4, default5, default6, default7, default8, default9, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq> zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15, Seq s16, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15, T16 default16) { return zipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, default16, Tuple::tuple); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, T1 default1, T2 default2, BiFunction zipper) { return zipAll(seq(s1), seq(s2), default1, default2, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, T1 default1, T2 default2, T3 default3, Function3 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), default1, default2, default3, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, T1 default1, T2 default2, T3 default3, T4 default4, Function4 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), default1, default2, default3, default4, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, Function5 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), default1, default2, default3, default4, default5, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, Function6 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), default1, default2, default3, default4, default5, default6, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, Function7 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), default1, default2, default3, default4, default5, default6, default7, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, Function8 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), default1, default2, default3, default4, default5, default6, default7, default8, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, Function9 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), default1, default2, default3, default4, default5, default6, default7, default8, default9, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, Function10 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, Function11 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, Function12 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, Function13 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, Function14 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15, Function15 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15, Stream s16, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15, T16 default16, Function16 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15), seq(s16), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, default16, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, T1 default1, T2 default2, BiFunction zipper) { return zipAll(seq(s1), seq(s2), default1, default2, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, T1 default1, T2 default2, T3 default3, Function3 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), default1, default2, default3, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, T1 default1, T2 default2, T3 default3, T4 default4, Function4 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), default1, default2, default3, default4, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, Function5 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), default1, default2, default3, default4, default5, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, Function6 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), default1, default2, default3, default4, default5, default6, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, Function7 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), default1, default2, default3, default4, default5, default6, default7, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, Function8 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), default1, default2, default3, default4, default5, default6, default7, default8, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, Function9 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), default1, default2, default3, default4, default5, default6, default7, default8, default9, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, Function10 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, Function11 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, Function12 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, Iterable s13, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, Function13 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, Iterable s13, Iterable s14, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, Function14 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, Iterable s13, Iterable s14, Iterable s15, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15, Function15 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, zipper); } /** * Zip two streams into one - by storing the corresponding elements from them in a tuple, * when one of streams will end - a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // (tuple(1, "a"), tuple(2, "x"), tuple(3, "x"))
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x")
     * 
*/ static Seq zipAll(Iterable s1, Iterable s2, Iterable s3, Iterable s4, Iterable s5, Iterable s6, Iterable s7, Iterable s8, Iterable s9, Iterable s10, Iterable s11, Iterable s12, Iterable s13, Iterable s14, Iterable s15, Iterable s16, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15, T16 default16, Function16 zipper) { return zipAll(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15), seq(s16), default1, default2, default3, default4, default5, default6, default7, default8, default9, default10, default11, default12, default13, default14, default15, default16, zipper); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, T1 default1, T2 default2, BiFunction zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); if (!b1 && !b2) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, T1 default1, T2 default2, T3 default3, Function3 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); if (!b1 && !b2 && !b3) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, T1 default1, T2 default2, T3 default3, T4 default4, Function4 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); if (!b1 && !b2 && !b3 && !b4) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, Function5 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, Function6 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, Function7 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, Function8 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext() || it8.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); boolean b8 = it8.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 && !b8) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7, b8 ? it8.next() : default8 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, Function9 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext() || it8.hasNext() || it9.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); boolean b8 = it8.hasNext(); boolean b9 = it9.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 && !b8 && !b9) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7, b8 ? it8.next() : default8, b9 ? it9.next() : default9 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, Function10 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext() || it8.hasNext() || it9.hasNext() || it10.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); boolean b8 = it8.hasNext(); boolean b9 = it9.hasNext(); boolean b10 = it10.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 && !b8 && !b9 && !b10) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7, b8 ? it8.next() : default8, b9 ? it9.next() : default9, b10 ? it10.next() : default10 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, Function11 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext() || it8.hasNext() || it9.hasNext() || it10.hasNext() || it11.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); boolean b8 = it8.hasNext(); boolean b9 = it9.hasNext(); boolean b10 = it10.hasNext(); boolean b11 = it11.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 && !b8 && !b9 && !b10 && !b11) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7, b8 ? it8.next() : default8, b9 ? it9.next() : default9, b10 ? it10.next() : default10, b11 ? it11.next() : default11 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, Function12 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext() || it8.hasNext() || it9.hasNext() || it10.hasNext() || it11.hasNext() || it12.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); boolean b8 = it8.hasNext(); boolean b9 = it9.hasNext(); boolean b10 = it10.hasNext(); boolean b11 = it11.hasNext(); boolean b12 = it12.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 && !b8 && !b9 && !b10 && !b11 && !b12) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7, b8 ? it8.next() : default8, b9 ? it9.next() : default9, b10 ? it10.next() : default10, b11 ? it11.next() : default11, b12 ? it12.next() : default12 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, Function13 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); final Iterator it13 = s13.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext() || it8.hasNext() || it9.hasNext() || it10.hasNext() || it11.hasNext() || it12.hasNext() || it13.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); boolean b8 = it8.hasNext(); boolean b9 = it9.hasNext(); boolean b10 = it10.hasNext(); boolean b11 = it11.hasNext(); boolean b12 = it12.hasNext(); boolean b13 = it13.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 && !b8 && !b9 && !b10 && !b11 && !b12 && !b13) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7, b8 ? it8.next() : default8, b9 ? it9.next() : default9, b10 ? it10.next() : default10, b11 ? it11.next() : default11, b12 ? it12.next() : default12, b13 ? it13.next() : default13 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, Function14 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); final Iterator it13 = s13.iterator(); final Iterator it14 = s14.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext() || it8.hasNext() || it9.hasNext() || it10.hasNext() || it11.hasNext() || it12.hasNext() || it13.hasNext() || it14.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); boolean b8 = it8.hasNext(); boolean b9 = it9.hasNext(); boolean b10 = it10.hasNext(); boolean b11 = it11.hasNext(); boolean b12 = it12.hasNext(); boolean b13 = it13.hasNext(); boolean b14 = it14.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 && !b8 && !b9 && !b10 && !b11 && !b12 && !b13 && !b14) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7, b8 ? it8.next() : default8, b9 ? it9.next() : default9, b10 ? it10.next() : default10, b11 ? it11.next() : default11, b12 ? it12.next() : default12, b13 ? it13.next() : default13, b14 ? it14.next() : default14 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15, Function15 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); final Iterator it13 = s13.iterator(); final Iterator it14 = s14.iterator(); final Iterator it15 = s15.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext() || it8.hasNext() || it9.hasNext() || it10.hasNext() || it11.hasNext() || it12.hasNext() || it13.hasNext() || it14.hasNext() || it15.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); boolean b8 = it8.hasNext(); boolean b9 = it9.hasNext(); boolean b10 = it10.hasNext(); boolean b11 = it11.hasNext(); boolean b12 = it12.hasNext(); boolean b13 = it13.hasNext(); boolean b14 = it14.hasNext(); boolean b15 = it15.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 && !b8 && !b9 && !b10 && !b11 && !b12 && !b13 && !b14 && !b15) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7, b8 ? it8.next() : default8, b9 ? it9.next() : default9, b10 ? it10.next() : default10, b11 ? it11.next() : default11, b12 ? it12.next() : default12, b13 ? it13.next() : default13, b14 ? it14.next() : default14, b15 ? it15.next() : default15 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15)); } /** * Zip two streams into one using a {@link BiFunction} to produce resulting values, * when one of streams will end, a default value for that stream will be provided instead - * so the resulting stream will be as long as the longest of the two streams. *

*

     * // ("1:a", "2:x", "3:x")
     * Seq.zipAll(Seq.of(1, 2, 3), Seq.of("a"), 0, "x", (i, s) -> i + ":" + s)
     * 
*/ static Seq zipAll(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15, Seq s16, T1 default1, T2 default2, T3 default3, T4 default4, T5 default5, T6 default6, T7 default7, T8 default8, T9 default9, T10 default10, T11 default11, T12 default12, T13 default13, T14 default14, T15 default15, T16 default16, Function16 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); final Iterator it13 = s13.iterator(); final Iterator it14 = s14.iterator(); final Iterator it15 = s15.iterator(); final Iterator it16 = s16.iterator(); class ZipAll implements Iterator { @Override public boolean hasNext() { return it1.hasNext() || it2.hasNext() || it3.hasNext() || it4.hasNext() || it5.hasNext() || it6.hasNext() || it7.hasNext() || it8.hasNext() || it9.hasNext() || it10.hasNext() || it11.hasNext() || it12.hasNext() || it13.hasNext() || it14.hasNext() || it15.hasNext() || it16.hasNext(); } @Override public R next() { boolean b1 = it1.hasNext(); boolean b2 = it2.hasNext(); boolean b3 = it3.hasNext(); boolean b4 = it4.hasNext(); boolean b5 = it5.hasNext(); boolean b6 = it6.hasNext(); boolean b7 = it7.hasNext(); boolean b8 = it8.hasNext(); boolean b9 = it9.hasNext(); boolean b10 = it10.hasNext(); boolean b11 = it11.hasNext(); boolean b12 = it12.hasNext(); boolean b13 = it13.hasNext(); boolean b14 = it14.hasNext(); boolean b15 = it15.hasNext(); boolean b16 = it16.hasNext(); if (!b1 && !b2 && !b3 && !b4 && !b5 && !b6 && !b7 && !b8 && !b9 && !b10 && !b11 && !b12 && !b13 && !b14 && !b15 && !b16) throw new NoSuchElementException("next on empty iterator"); return zipper.apply( b1 ? it1.next() : default1, b2 ? it2.next() : default2, b3 ? it3.next() : default3, b4 ? it4.next() : default4, b5 ? it5.next() : default5, b6 ? it6.next() : default6, b7 ? it7.next() : default7, b8 ? it8.next() : default8, b9 ? it9.next() : default9, b10 ? it10.next() : default10, b11 ? it11.next() : default11, b12 ? it12.next() : default12, b13 ? it13.next() : default13, b14 ? it14.next() : default14, b15 ? it15.next() : default15, b16 ? it16.next() : default16 ); } } return seq(new ZipAll()).onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16)); } // [jooq-tools] END [zip-all-static] /** * Zip a Stream with a corresponding Stream of indexes. *

*

     * // (tuple("a", 0), tuple("b", 1), tuple("c", 2))
     * Seq.of("a", "b", "c").zipWithIndex()
     * 
* * @see #zipWithIndex(Stream) */ default Seq> zipWithIndex() { return zipWithIndex(this); } /** * Fold a Stream to the left. *

*

     * // "!abc"
     * Seq.of("a", "b", "c").foldLeft("!", (u, t) -> u + t)
     * 
*/ default U foldLeft(U seed, BiFunction function) { return foldLeft(this, seed, function); } /** * Fold a Stream to the right. *

*

     * // "abc!"
     * Seq.of("a", "b", "c").foldRight("!", (t, u) -> t + u)
     * 
*/ default U foldRight(U seed, BiFunction function) { return foldRight(this, seed, function); } /** * Scan a stream to the left. *

*

     * // ("", "a", "ab", "abc")
     * Seq.of("a", "b", "c").scanLeft("", (u, t) -> u + t)
     * 
*/ default Seq scanLeft(U seed, BiFunction function) { return scanLeft(this, seed, function); } /** * Scan a stream to the right. *

*

     * // ("", "c", "cb", "cba")
     * Seq.of("a", "b", "c").scanRight("", (t, u) -> u + t)
     * 
*/ default Seq scanRight(U seed, BiFunction function) { return scanRight(this, seed, function); } /** * Reverse a stream. *

*

     * // (3, 2, 1)
     * Seq.of(1, 2, 3).reverse()
     * 
*/ default Seq reverse() { return reverse(this); } /** * Shuffle a stream *

*

     * // e.g. (2, 3, 1)
     * Seq.of(1, 2, 3).shuffle()
     * 
*/ default Seq shuffle() { return shuffle(this); } /** * Shuffle a stream using specified source of randomness *

*

     * // e.g. (2, 3, 1)
     * Seq.of(1, 2, 3).shuffle(new Random())
     * 
*/ default Seq shuffle(Random random) { return shuffle(this, random); } /** * Returns a stream with all elements skipped for which a predicate evaluates to true. *

*

     * // (3, 4, 5)
     * Seq.of(1, 2, 3, 4, 5).skipWhile(i -> i < 3)
     * 
* * @see #skipWhile(Stream, Predicate) */ default Seq skipWhile(Predicate predicate) { return skipWhile(this, predicate); } /** * Returns a stream with all elements skipped for which a predicate evaluates to true * plus the first element for which it evaluates to false. *

*

     * // (4, 5)
     * Seq.of(1, 2, 3, 4, 5).skipWhileClosed(i -> i < 3)
     * 
* * @see #skipWhileClosed(Stream, Predicate) */ default Seq skipWhileClosed(Predicate predicate) { return skipWhileClosed(this, predicate); } /** * Returns a stream with all elements skipped for which a predicate evaluates to false. *

*

     * // (3, 4, 5)
     * Seq.of(1, 2, 3, 4, 5).skipUntil(i -> i == 3)
     * 
* * @see #skipUntil(Stream, Predicate) */ default Seq skipUntil(Predicate predicate) { return skipUntil(this, predicate); } /** * Returns a stream with all elements skipped for which a predicate evaluates to false * plus the first element for which it evaluates to true. *

*

     * // (4, 5)
     * Seq.of(1, 2, 3, 4, 5).skipUntilClosed(i -> i == 3)
     * 
* * @see #skipUntilClosed(Stream, Predicate) */ default Seq skipUntilClosed(Predicate predicate) { return skipUntilClosed(this, predicate); } /** * Returns a stream limited to all elements for which a predicate evaluates to true. *

*

     * // (1, 2)
     * Seq.of(1, 2, 3, 4, 5).limitWhile(i -> i < 3)
     * 
* * @see #limitWhile(Stream, Predicate) */ default Seq limitWhile(Predicate predicate) { return limitWhile(this, predicate); } /** * Returns a stream limited to all elements for which a predicate evaluates to true * plus the first element for which it evaluates to false. *

*

     * // (1, 2, 3)
     * Seq.of(1, 2, 3, 4, 5).limitWhileClosed(i -> i < 3)
     * 
* * @see #limitWhileClosed(Stream, Predicate) */ default Seq limitWhileClosed(Predicate predicate) { return limitWhileClosed(this, predicate); } /** * Returns a stream limited to all elements for which a predicate evaluates to false. *

*

     * // (1, 2)
     * Seq.of(1, 2, 3, 4, 5).limitUntil(i -> i == 3)
     * 
* * @see #limitUntil(Stream, Predicate) */ default Seq limitUntil(Predicate predicate) { return limitUntil(this, predicate); } /** * Returns a stream limited to all elements for which a predicate evaluates to false * plus the first element for which it evaluates to true. *

*

     * // (1, 2, 3)
     * Seq.of(1, 2, 3, 4, 5).limitUntilClosed(i -> i == 3)
     * 
* * @see #limitUntilClosed(Stream, Predicate) */ default Seq limitUntilClosed(Predicate predicate) { return limitUntilClosed(this, predicate); } /** * Returns a stream with a given value interspersed between any two values of this stream. *

*

     * // (1, 0, 2, 0, 3, 0, 4)
     * Seq.of(1, 2, 3, 4).intersperse(0)
     * 
* * @see #intersperse(Stream, Object) */ default Seq intersperse(T value) { return intersperse(this, value); } /** * Duplicate a Streams into two equivalent Streams. *

*

     * // tuple((1, 2, 3), (1, 2, 3))
     * Seq.of(1, 2, 3).duplicate()
     * 
* * @see #duplicate(Stream) */ default Tuple2, Seq> duplicate() { return duplicate(this); } /** * Classify this stream's elements according to a given classifier function. *

*

     * // Seq(tuple(1, Seq(1, 3, 5)), tuple(0, Seq(2, 4, 6)))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2)
     * // Seq(tuple(true, Seq(1, 3, 5)), tuple(false, Seq(2, 4, 6)))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 != 0)
     * 
* * This is a non-terminal analog of {@link #groupBy(Function)}) * @see #groupBy(Function) * @see #partition(Predicate) */ default Seq>> grouped(Function classifier) { return grouped(this, classifier); } /** * Classify this stream's elements according to a given classifier function * and collect each class's elements using a collector. *

*

     * // Seq(tuple(1, 9), tuple(0, 12))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2, Collectors.summingInt(i -> i))
     * // Seq(tuple(true, 9), tuple(false, 12))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 != 0, Collectors.summingInt(i -> i))
     * 
This is a non-terminal analog of * {@link #groupBy(Function, Collector)}) * * @see #groupBy(Function, Collector) */ default Seq> grouped(Function classifier, Collector downstream) { return grouped(this, classifier, downstream); } /** * Partition a stream into two given a predicate. *

*

     * // tuple((1, 3, 5), (2, 4, 6))
     * Seq.of(1, 2, 3, 4, 5, 6).partition(i -> i % 2 != 0)
     * 
* * @see #partition(Stream, Predicate) */ default Tuple2, Seq> partition(Predicate predicate) { return partition(this, predicate); } /** * Split a stream at a given position. *

*

     * // tuple((1, 2, 3), (4, 5, 6))
     * Seq.of(1, 2, 3, 4, 5, 6).splitAt(3)
     * 
* * @see #splitAt(Stream, long) */ default Tuple2, Seq> splitAt(long position) { return splitAt(this, position); } /** * Split a stream at the head. *

*

     * // tuple(1, (2, 3, 4, 5, 6))
     * Seq.of(1, 2, 3, 4, 5, 6).splitHead(3)
     * 
* * @see #splitAt(Stream, long) */ default Tuple2, Seq> splitAtHead() { return splitAtHead(this); } /** * Returns a limited interval from a given Stream. *

*

     * // (4, 5)
     * Seq.of(1, 2, 3, 4, 5, 6).slice(3, 5)
     * 
* * @see #slice(Stream, long, long) */ default Seq slice(long from, long to) { return slice(this, from, to); } /** * Check if the sequence has any elements */ default boolean isEmpty() { return !findAny().isPresent(); } /** * Check if the sequence has no elements */ default boolean isNotEmpty() { return !isEmpty(); } /** * Sort by the results of function. */ default > Seq sorted(Function function) { return sorted(comparing(function)); } /** * Sort by the results of function. */ default Seq sorted(Function function, Comparator comparator) { return sorted(comparing(function, comparator)); } // Methods taken from LINQ // ----------------------- /** * Keep only those elements in a stream that are of a given type. *

*

     * // (1, 2, 3)
     * Seq.of(1, "a", 2, "b", 3).ofType(Integer.class)
     * 
* * @see #ofType(Stream, Class) */ default Seq ofType(Class type) { return ofType(this, type); } /** * Cast all elements in a stream to a given type, possibly throwing a {@link ClassCastException}. *

*

     * // ClassCastException
     * Seq.of(1, "a", 2, "b", 3).cast(Integer.class)
     * 
* * @see #cast(Stream, Class) */ default Seq cast(Class type) { return cast(this, type); } /** * Map this stream to a stream containing a sliding window over the previous stream. *

*

     * // ((1, 2, 3), (2, 3, 4), (3, 4, 5))
     * .of(1, 2, 3, 4, 5).sliding(3);
     * 
*

* This is equivalent as using the more verbose window function version: *

     * int n = 3;
     * Seq.of(1, 2, 3, 4, 5)
     *    .window(0, n - 1)
     *    .filter(w -> w.count() == n)
     *    .map(w -> w.toList());
     * 
*/ default Seq> sliding(long size) { if (size <= 0) throw new IllegalArgumentException("Size must be >= 1"); return window(0, size - 1).filter(w -> w.count() == size).map(w -> w.window()); } /** * Map this stream to a windowed stream using the default partition and order. *

*

     * // (0, 1, 2, 3, 4)
     * Seq.of(1, 2, 4, 2, 3).window().map(Window::rowNumber)
     * 
*/ default Seq> window() { return window(Window.of()).map(t -> t.v1); } /** * Map this stream to a windowed stream using the default partition and order with frame. *

*

     * // (2, 4, 4, 4, 3)
     * Seq.of(1, 2, 4, 2, 3).window(-1, 1).map(Window::max)
     * 
*/ default Seq> window(long lower, long upper) { return window(Window.of(lower, upper)).map(t -> t.v1); } /** * Map this stream to a windowed stream using the default partition and a specific order. *

*

     * // (0, 1, 4, 2, 3)
     * Seq.of(1, 2, 4, 2, 3).window(naturalOrder()).map(Window::rowNumber)
     * 
*/ default Seq> window(Comparator orderBy) { return window(Window.of(orderBy)).map(t -> t.v1); } /** * Map this stream to a windowed stream using the default partition and a specific order with frame. *

*

     * // (1, 1, 3, 2, 2)
     * Seq.of(1, 2, 4, 2, 3).window(naturalOrder(), -1, 1).map(Window::min)
     * 
*/ default Seq> window(Comparator orderBy, long lower, long upper) { return window(Window.of(orderBy, lower, upper)).map(t -> t.v1); } /** * Map this stream to a windowed stream using a specific partition and the default order. *

*

     * // (1, 2, 2, 2, 1)
     * Seq.of(1, 2, 4, 2, 3).window(i -> i % 2).map(Window::min)
     * 
*/ default Seq> window(Function partitionBy) { return window(Window.of(partitionBy)).map(t -> t.v1); } /** * Map this stream to a windowed stream using a specific partition and the default order. *

*

     * // (3, 4, 4, 2, 3)
     * Seq.of(1, 4, 2, 2, 3).window(i -> i % 2, -1, 1).map(Window::max)
     * 
*/ default Seq> window(Function partitionBy, long lower, long upper) { return window(Window.of(partitionBy, lower, upper)).map(t -> t.v1); } /** * Map this stream to a windowed stream using a specific partition and order. *

*

     * // (1, 2, 4, 4, 3)
     * Seq.of(1, 2, 4, 2, 3).window(i -> i % 2, naturalOrder()).map(Window::max)
     * 
*/ default Seq> window(Function partitionBy, Comparator orderBy) { return window(Window.of(partitionBy, orderBy)).map(t -> t.v1); } /** * Map this stream to a windowed stream using a specific partition and order with frame. *

*

     * // (3, 2, 4, 4, 3)
     * Seq.of(1, 2, 4, 2, 3).window(i -> i % 2, naturalOrder(), -1, 1).map(Window::max)
     * 
*/ default Seq> window(Function partitionBy, Comparator orderBy, long lower, long upper) { return window(Window.of(partitionBy, orderBy, lower, upper)).map(t -> t.v1); } // [jooq-tools] START [windows] /** * Map this stream to a windowed stream with 1 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq>> window( WindowSpecification specification1 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 2 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window>> window( WindowSpecification specification1, WindowSpecification specification2 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 3 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 4 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 5 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 6 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 7 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 8 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7, WindowSpecification specification8 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); Map> partitions8 = SeqUtils.partitions(specification8, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7), (Window) new WindowImpl<>(t, partitions8.get(specification8.partition().apply(t.v1)), specification8) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 9 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7, WindowSpecification specification8, WindowSpecification specification9 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); Map> partitions8 = SeqUtils.partitions(specification8, buffer); Map> partitions9 = SeqUtils.partitions(specification9, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7), (Window) new WindowImpl<>(t, partitions8.get(specification8.partition().apply(t.v1)), specification8), (Window) new WindowImpl<>(t, partitions9.get(specification9.partition().apply(t.v1)), specification9) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 10 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7, WindowSpecification specification8, WindowSpecification specification9, WindowSpecification specification10 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); Map> partitions8 = SeqUtils.partitions(specification8, buffer); Map> partitions9 = SeqUtils.partitions(specification9, buffer); Map> partitions10 = SeqUtils.partitions(specification10, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7), (Window) new WindowImpl<>(t, partitions8.get(specification8.partition().apply(t.v1)), specification8), (Window) new WindowImpl<>(t, partitions9.get(specification9.partition().apply(t.v1)), specification9), (Window) new WindowImpl<>(t, partitions10.get(specification10.partition().apply(t.v1)), specification10) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 11 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7, WindowSpecification specification8, WindowSpecification specification9, WindowSpecification specification10, WindowSpecification specification11 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); Map> partitions8 = SeqUtils.partitions(specification8, buffer); Map> partitions9 = SeqUtils.partitions(specification9, buffer); Map> partitions10 = SeqUtils.partitions(specification10, buffer); Map> partitions11 = SeqUtils.partitions(specification11, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7), (Window) new WindowImpl<>(t, partitions8.get(specification8.partition().apply(t.v1)), specification8), (Window) new WindowImpl<>(t, partitions9.get(specification9.partition().apply(t.v1)), specification9), (Window) new WindowImpl<>(t, partitions10.get(specification10.partition().apply(t.v1)), specification10), (Window) new WindowImpl<>(t, partitions11.get(specification11.partition().apply(t.v1)), specification11) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 12 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7, WindowSpecification specification8, WindowSpecification specification9, WindowSpecification specification10, WindowSpecification specification11, WindowSpecification specification12 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); Map> partitions8 = SeqUtils.partitions(specification8, buffer); Map> partitions9 = SeqUtils.partitions(specification9, buffer); Map> partitions10 = SeqUtils.partitions(specification10, buffer); Map> partitions11 = SeqUtils.partitions(specification11, buffer); Map> partitions12 = SeqUtils.partitions(specification12, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7), (Window) new WindowImpl<>(t, partitions8.get(specification8.partition().apply(t.v1)), specification8), (Window) new WindowImpl<>(t, partitions9.get(specification9.partition().apply(t.v1)), specification9), (Window) new WindowImpl<>(t, partitions10.get(specification10.partition().apply(t.v1)), specification10), (Window) new WindowImpl<>(t, partitions11.get(specification11.partition().apply(t.v1)), specification11), (Window) new WindowImpl<>(t, partitions12.get(specification12.partition().apply(t.v1)), specification12) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 13 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7, WindowSpecification specification8, WindowSpecification specification9, WindowSpecification specification10, WindowSpecification specification11, WindowSpecification specification12, WindowSpecification specification13 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); Map> partitions8 = SeqUtils.partitions(specification8, buffer); Map> partitions9 = SeqUtils.partitions(specification9, buffer); Map> partitions10 = SeqUtils.partitions(specification10, buffer); Map> partitions11 = SeqUtils.partitions(specification11, buffer); Map> partitions12 = SeqUtils.partitions(specification12, buffer); Map> partitions13 = SeqUtils.partitions(specification13, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7), (Window) new WindowImpl<>(t, partitions8.get(specification8.partition().apply(t.v1)), specification8), (Window) new WindowImpl<>(t, partitions9.get(specification9.partition().apply(t.v1)), specification9), (Window) new WindowImpl<>(t, partitions10.get(specification10.partition().apply(t.v1)), specification10), (Window) new WindowImpl<>(t, partitions11.get(specification11.partition().apply(t.v1)), specification11), (Window) new WindowImpl<>(t, partitions12.get(specification12.partition().apply(t.v1)), specification12), (Window) new WindowImpl<>(t, partitions13.get(specification13.partition().apply(t.v1)), specification13) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 14 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7, WindowSpecification specification8, WindowSpecification specification9, WindowSpecification specification10, WindowSpecification specification11, WindowSpecification specification12, WindowSpecification specification13, WindowSpecification specification14 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); Map> partitions8 = SeqUtils.partitions(specification8, buffer); Map> partitions9 = SeqUtils.partitions(specification9, buffer); Map> partitions10 = SeqUtils.partitions(specification10, buffer); Map> partitions11 = SeqUtils.partitions(specification11, buffer); Map> partitions12 = SeqUtils.partitions(specification12, buffer); Map> partitions13 = SeqUtils.partitions(specification13, buffer); Map> partitions14 = SeqUtils.partitions(specification14, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7), (Window) new WindowImpl<>(t, partitions8.get(specification8.partition().apply(t.v1)), specification8), (Window) new WindowImpl<>(t, partitions9.get(specification9.partition().apply(t.v1)), specification9), (Window) new WindowImpl<>(t, partitions10.get(specification10.partition().apply(t.v1)), specification10), (Window) new WindowImpl<>(t, partitions11.get(specification11.partition().apply(t.v1)), specification11), (Window) new WindowImpl<>(t, partitions12.get(specification12.partition().apply(t.v1)), specification12), (Window) new WindowImpl<>(t, partitions13.get(specification13.partition().apply(t.v1)), specification13), (Window) new WindowImpl<>(t, partitions14.get(specification14.partition().apply(t.v1)), specification14) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 15 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7, WindowSpecification specification8, WindowSpecification specification9, WindowSpecification specification10, WindowSpecification specification11, WindowSpecification specification12, WindowSpecification specification13, WindowSpecification specification14, WindowSpecification specification15 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); Map> partitions8 = SeqUtils.partitions(specification8, buffer); Map> partitions9 = SeqUtils.partitions(specification9, buffer); Map> partitions10 = SeqUtils.partitions(specification10, buffer); Map> partitions11 = SeqUtils.partitions(specification11, buffer); Map> partitions12 = SeqUtils.partitions(specification12, buffer); Map> partitions13 = SeqUtils.partitions(specification13, buffer); Map> partitions14 = SeqUtils.partitions(specification14, buffer); Map> partitions15 = SeqUtils.partitions(specification15, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7), (Window) new WindowImpl<>(t, partitions8.get(specification8.partition().apply(t.v1)), specification8), (Window) new WindowImpl<>(t, partitions9.get(specification9.partition().apply(t.v1)), specification9), (Window) new WindowImpl<>(t, partitions10.get(specification10.partition().apply(t.v1)), specification10), (Window) new WindowImpl<>(t, partitions11.get(specification11.partition().apply(t.v1)), specification11), (Window) new WindowImpl<>(t, partitions12.get(specification12.partition().apply(t.v1)), specification12), (Window) new WindowImpl<>(t, partitions13.get(specification13.partition().apply(t.v1)), specification13), (Window) new WindowImpl<>(t, partitions14.get(specification14.partition().apply(t.v1)), specification14), (Window) new WindowImpl<>(t, partitions15.get(specification15.partition().apply(t.v1)), specification15) )) .onClose(this::close); } /** * Map this stream to a windowed stream with 16 distinct windows. */ @Generated("This method was generated using jOOQ-tools") default Seq, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window, Window>> window( WindowSpecification specification1, WindowSpecification specification2, WindowSpecification specification3, WindowSpecification specification4, WindowSpecification specification5, WindowSpecification specification6, WindowSpecification specification7, WindowSpecification specification8, WindowSpecification specification9, WindowSpecification specification10, WindowSpecification specification11, WindowSpecification specification12, WindowSpecification specification13, WindowSpecification specification14, WindowSpecification specification15, WindowSpecification specification16 ) { List> buffer = zipWithIndex().toList(); Map> partitions1 = SeqUtils.partitions(specification1, buffer); Map> partitions2 = SeqUtils.partitions(specification2, buffer); Map> partitions3 = SeqUtils.partitions(specification3, buffer); Map> partitions4 = SeqUtils.partitions(specification4, buffer); Map> partitions5 = SeqUtils.partitions(specification5, buffer); Map> partitions6 = SeqUtils.partitions(specification6, buffer); Map> partitions7 = SeqUtils.partitions(specification7, buffer); Map> partitions8 = SeqUtils.partitions(specification8, buffer); Map> partitions9 = SeqUtils.partitions(specification9, buffer); Map> partitions10 = SeqUtils.partitions(specification10, buffer); Map> partitions11 = SeqUtils.partitions(specification11, buffer); Map> partitions12 = SeqUtils.partitions(specification12, buffer); Map> partitions13 = SeqUtils.partitions(specification13, buffer); Map> partitions14 = SeqUtils.partitions(specification14, buffer); Map> partitions15 = SeqUtils.partitions(specification15, buffer); Map> partitions16 = SeqUtils.partitions(specification16, buffer); return seq(buffer) .map(t -> tuple( (Window) new WindowImpl<>(t, partitions1.get(specification1.partition().apply(t.v1)), specification1), (Window) new WindowImpl<>(t, partitions2.get(specification2.partition().apply(t.v1)), specification2), (Window) new WindowImpl<>(t, partitions3.get(specification3.partition().apply(t.v1)), specification3), (Window) new WindowImpl<>(t, partitions4.get(specification4.partition().apply(t.v1)), specification4), (Window) new WindowImpl<>(t, partitions5.get(specification5.partition().apply(t.v1)), specification5), (Window) new WindowImpl<>(t, partitions6.get(specification6.partition().apply(t.v1)), specification6), (Window) new WindowImpl<>(t, partitions7.get(specification7.partition().apply(t.v1)), specification7), (Window) new WindowImpl<>(t, partitions8.get(specification8.partition().apply(t.v1)), specification8), (Window) new WindowImpl<>(t, partitions9.get(specification9.partition().apply(t.v1)), specification9), (Window) new WindowImpl<>(t, partitions10.get(specification10.partition().apply(t.v1)), specification10), (Window) new WindowImpl<>(t, partitions11.get(specification11.partition().apply(t.v1)), specification11), (Window) new WindowImpl<>(t, partitions12.get(specification12.partition().apply(t.v1)), specification12), (Window) new WindowImpl<>(t, partitions13.get(specification13.partition().apply(t.v1)), specification13), (Window) new WindowImpl<>(t, partitions14.get(specification14.partition().apply(t.v1)), specification14), (Window) new WindowImpl<>(t, partitions15.get(specification15.partition().apply(t.v1)), specification15), (Window) new WindowImpl<>(t, partitions16.get(specification16.partition().apply(t.v1)), specification16) )) .onClose(this::close); } // [jooq-tools] END [windows] // Shortcuts to Collectors // ----------------------- /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#groupingBy(Function)} collector. */ default Map> groupBy(Function classifier) { return collect(Collectors.groupingBy(classifier)); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#groupingBy(Function, Collector)} collector. */ default Map groupBy(Function classifier, Collector downstream) { return collect(Collectors.groupingBy(classifier, downstream)); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#groupingBy(Function, Supplier, Collector)} collector. */ default > M groupBy(Function classifier, Supplier mapFactory, Collector downstream) { return collect(Collectors.groupingBy(classifier, mapFactory, downstream)); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#joining()} * collector. * * @deprecated - Use {@link #toString()} instead. This method will be * removed in the future as it causes confusion with * {@link #innerJoin(Seq, BiPredicate)}. */ @Deprecated default String join() { return map(Objects::toString).collect(Collectors.joining()); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#joining(CharSequence)} * collector. * * @deprecated - Use {@link #toString(CharSequence)} instead. This method * will be removed in the future as it causes confusion with * {@link #innerJoin(Seq, BiPredicate)}. */ @Deprecated default String join(CharSequence delimiter) { return map(Objects::toString).collect(Collectors.joining(delimiter)); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#joining(CharSequence, CharSequence, CharSequence)} * collector. * * @deprecated - Use * {@link #toString(CharSequence, CharSequence, CharSequence)} instead. This * method will be removed in the future as it causes confusion with * {@link #innerJoin(Seq, BiPredicate)}. */ @Deprecated default String join(CharSequence delimiter, CharSequence prefix, CharSequence suffix) { return map(Objects::toString).collect(Collectors.joining(delimiter, prefix, suffix)); } /** * @see Stream#of(Object) */ static Seq of(T value) { return seq(Stream.of(value)); } /** * @see Stream#of(Object[]) */ @SafeVarargs static Seq of(T... values) { return seq(Stream.of(values)); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) */ static Seq range(byte from, byte to) { return range(from, to, (byte) 1); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) * @param step The increase between two values */ static Seq range(byte from, byte to, int step) { return to <= from ? empty() : iterate(from, t -> Byte.valueOf((byte) (t + step))).limitWhile(t -> t < to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) */ static Seq range(short from, short to) { return range(from, to, (short) 1); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) * @param step The increase between two values */ static Seq range(short from, short to, int step) { return to <= from ? empty() : iterate(from, t -> Short.valueOf((short) (t + step))).limitWhile(t -> t < to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) */ static Seq range(char from, char to) { return range(from, to, (short) 1); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) * @param step The increase between two values */ static Seq range(char from, char to, int step) { return to <= from ? empty() : iterate(from, t -> Character.valueOf((char) (t + step))).limitWhile(t -> t < to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) */ static Seq range(int from, int to) { return range(from, to, 1); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) * @param step The increase between two values */ static Seq range(int from, int to, int step) { return to <= from ? empty() : iterate(from, t -> Integer.valueOf(t + step)).limitWhile(t -> t < to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) */ static Seq range(long from, long to) { return range(from, to, 1L); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) * @param step The increase between two values */ static Seq range(long from, long to, long step) { return to <= from ? empty() : iterate(from, t -> Long.valueOf(t + step)).limitWhile(t -> t < to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) */ static Seq range(Instant from, Instant to) { return range(from, to, Duration.ofSeconds(1)); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) * @param step The increase between two values */ static Seq range(Instant from, Instant to, Duration step) { return to.compareTo(from) <= 0 ? empty() : iterate(from, t -> t.plus(step)).limitWhile(t -> t.compareTo(to) < 0); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) */ static Seq rangeClosed(byte from, byte to) { return rangeClosed(from, to, (byte) 1); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) * @param step The increase between two values */ static Seq rangeClosed(byte from, byte to, int step) { return to < from ? empty() : iterate(from, t -> Byte.valueOf((byte) (t + step))).limitWhile(t -> t <= to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) */ static Seq rangeClosed(short from, short to) { return rangeClosed(from, to, (short) 1); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) * @param step The increase between two values */ static Seq rangeClosed(short from, short to, int step) { return to < from ? empty() : iterate(from, t -> Short.valueOf((short) (t + step))).limitWhile(t -> t <= to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) */ static Seq rangeClosed(char from, char to) { return rangeClosed(from, to, 1); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) * @param step The increase between two values */ static Seq rangeClosed(char from, char to, int step) { return to < from ? empty() : iterate(from, t -> Character.valueOf((char) (t + step))).limitWhile(t -> t <= to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) */ static Seq rangeClosed(int from, int to) { return rangeClosed(from, to, 1); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) * @param step The increase between two values */ static Seq rangeClosed(int from, int to, int step) { return to < from ? empty() : iterate(from, t -> Integer.valueOf(t + step)).limitWhile(t -> t <= to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) */ static Seq rangeClosed(long from, long to) { return rangeClosed(from, to, 1L); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (inclusive) * @param step The increase between two values */ static Seq rangeClosed(long from, long to, long step) { return to < from ? empty() : iterate(from, t -> Long.valueOf(t + step)).limitWhile(t -> t <= to); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) */ static Seq rangeClosed(Instant from, Instant to) { return rangeClosed(from, to, Duration.ofSeconds(1)); } /** * The range between two values. * * @param from The lower bound (inclusive) * @param to The upper bound (exclusive) * @param step The increase between two values */ static Seq rangeClosed(Instant from, Instant to, Duration step) { return to.compareTo(from) < 0 ? empty() : iterate(from, t -> t.plus(step)).limitWhile(t -> t.compareTo(to) <= 0); } /** * @see Stream#empty() */ static Seq empty() { return seq(Stream.empty()); } /** * @see Stream#iterate(Object, UnaryOperator) */ static Seq iterate(final T seed, final UnaryOperator f) { return seq(Stream.iterate(seed, f)); } /** * @see Stream#generate(Supplier) */ static Seq generate() { return generate(() -> null); } /** * @see Stream#generate(Supplier) */ static Seq generate(T value) { return generate(() -> value); } /** * @see Stream#generate(Supplier) */ static Seq generate(Supplier s) { return seq(Stream.generate(s)); } /** * Wrap an array slice into a Seq. * * @throws IndexOutOfBoundsException if * (startIndex < 0 || endIndex > size || * startIndex > endIndex) */ static Seq seq(T[] values, int startIndex, int endIndex) { return seq(Arrays.asList(values).subList(startIndex, endIndex)); } /** * Wrap a Stream into a Seq. */ @SuppressWarnings("unchecked") static Seq seq(Stream stream) { if (stream instanceof Seq) return (Seq) stream; return new SeqImpl<>(stream); } /** * Wrap a Stream into a Seq. */ @SuppressWarnings("unchecked") static Seq seq(Seq stream) { return (Seq) stream; } /** * Wrap a IntStream into a Seq. */ static Seq seq(IntStream stream) { return new SeqImpl<>(stream.boxed()); } /** * Wrap a IntStream into a Seq. */ static Seq seq(LongStream stream) { return new SeqImpl<>(stream.boxed()); } /** * Wrap a IntStream into a Seq. */ static Seq seq(DoubleStream stream) { return new SeqImpl<>(stream.boxed()); } /** * Wrap an Iterable into a Seq. */ static Seq seq(Iterable iterable) { return seq(iterable.iterator()); } /** * Wrap an Iterator into a Seq. */ static Seq seq(Iterator iterator) { return seq(spliteratorUnknownSize(iterator, ORDERED)); } /** * Wrap an Enumeration into a Seq. */ static Seq seq(Enumeration enumeration) { return Seq.seq(new Iterator() { @Override public boolean hasNext() { return enumeration.hasMoreElements(); } @Override public T next() { return enumeration.nextElement(); } }); } /** * Wrap a Spliterator into a Seq. */ static Seq seq(Spliterator spliterator) { return seq(StreamSupport.stream(spliterator, false)); } /** * Wrap a Map into a Seq. */ static Seq> seq(Map map) { return seq(map.entrySet()).map(e -> tuple(e.getKey(), e.getValue())); } /** * Wrap an Optional into a Seq. */ static Seq seq(Optional optional) { return optional.map(Seq::of).orElseGet(Seq::empty); } /** * Wrap an InputStream into a Seq. *

* Client code must close the InputStream. All * {@link IOException}'s thrown be the InputStream are wrapped * by {@link UncheckedIOException}'s. */ static Seq seq(InputStream is) { FunctionalSpliterator spliterator = consumer -> { try { int value = is.read(); if (value != -1) consumer.accept((byte) value); return value != -1; } catch (IOException e) { throw new UncheckedIOException(e); } }; return seq(spliterator).onClose(Unchecked.runnable(is::close)); } /** * Wrap a Reader into a Seq. *

* Client code must close the Reader. All * {@link IOException}'s thrown be the InputStream are wrapped * by {@link UncheckedIOException}'s. */ static Seq seq(Reader reader) { FunctionalSpliterator spliterator = consumer -> { try { int value = reader.read(); if (value != -1) consumer.accept((char) value); return value != -1; } catch (IOException e) { throw new UncheckedIOException(e); } }; return seq(spliterator).onClose(Unchecked.runnable(reader::close)); } /** * Repeat a stream infinitely. *

*

     * // (1, 2, 3, 1, 2, 3, ...)
     * Seq.of(1, 2, 3).cycle();
     * 
*/ static Seq cycle(Stream stream) { return cycle(seq(stream)); } /** * Repeat a stream infinitely. *

*

     * // (1, 2, 3, 1, 2, 3, ...)
     * Seq.of(1, 2, 3).cycle();
     * 
*/ static Seq cycle(Iterable iterable) { return cycle(seq(iterable)); } /** * Repeat a stream infinitely. *

*

     * // (1, 2, 3, 1, 2, 3, ...)
     * Seq.of(1, 2, 3).cycle();
     * 
*/ static Seq cycle(Seq stream) { return cycle(stream, -1); } /** * Repeat a stream a certain amount of times. *

*

     * // ()
     * Seq.of(1, 2, 3).cycle(0);
     * 
     * // (1, 2, 3)
     * Seq.of(1, 2, 3).cycle(1);
     * 
     * // (1, 2, 3, 1, 2, 3, 1, 2, 3)
     * Seq.of(1, 2, 3).cycle(3);
     * 
* * @see #cycle(Stream) */ static Seq cycle(Stream stream, long times) { return cycle(seq(stream), times); } /** * Repeat a stream a certain amount of times. *

*

     * // ()
     * Seq.of(1, 2, 3).cycle(0);
     * 
     * // (1, 2, 3)
     * Seq.of(1, 2, 3).cycle(1);
     * 
     * // (1, 2, 3, 1, 2, 3, 1, 2, 3)
     * Seq.of(1, 2, 3).cycle(3);
     * 
* * @see #cycle(Stream) */ static Seq cycle(Iterable iterable, long times) { return cycle(seq(iterable), times); } /** * Repeat a stream a certain amount of times. *

*

     * // ()
     * Seq.of(1, 2, 3).cycle(0);
     * 
     * // (1, 2, 3)
     * Seq.of(1, 2, 3).cycle(1);
     * 
     * // (1, 2, 3, 1, 2, 3, 1, 2, 3)
     * Seq.of(1, 2, 3).cycle(3);
     * 
* * @see #cycle(Stream) */ @SuppressWarnings("unchecked") static Seq cycle(Seq stream, long times) { if (times == 0) return empty(); if (times == 1) return (Seq) stream; List list = new ArrayList<>(); Spliterator[] sp = new Spliterator[1]; long[] remaining = new long[] { times }; return SeqUtils.transform(stream, (delegate, action) -> { if (sp[0] == null) { if (delegate.tryAdvance(t -> { list.add(t); action.accept(t); })) return true; else sp[0] = list.spliterator(); } if (!sp[0].tryAdvance(action)) { if (times != -1 && (remaining[0] = remaining[0] - 1) == 1) return false; sp[0] = list.spliterator(); if (!sp[0].tryAdvance(action)) return false; } return true; }); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Stream> stream) { return unzip(seq(stream)); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Stream> stream, Function leftUnzipper, Function rightUnzipper) { return unzip(seq(stream), leftUnzipper, rightUnzipper); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Stream> stream, Function, Tuple2> unzipper) { return unzip(seq(stream), unzipper); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Stream> stream, BiFunction> unzipper) { return unzip(seq(stream), unzipper); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Iterable> iterable) { return unzip(seq(iterable)); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Iterable> iterable, Function leftUnzipper, Function rightUnzipper) { return unzip(seq(iterable), leftUnzipper, rightUnzipper); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Iterable> iterable, Function, Tuple2> unzipper) { return unzip(seq(iterable), unzipper); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Iterable> iterable, BiFunction> unzipper) { return unzip(seq(iterable), unzipper); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Seq> stream) { return unzip(stream, t -> t); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Seq> stream, Function leftUnzipper, Function rightUnzipper) { return unzip(stream, t -> tuple(leftUnzipper.apply(t.v1), rightUnzipper.apply(t.v2))); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Seq> stream, Function, Tuple2> unzipper) { return unzip(stream, (t1, t2) -> unzipper.apply(tuple(t1, t2))); } /** * Unzip one Stream into two. *

*

     * // tuple((1, 2, 3), (a, b, c))
     * Seq.unzip(Seq.of(tuple(1, "a"), tuple(2, "b"), tuple(3, "c")));
     * 
*/ static Tuple2, Seq> unzip(Seq> stream, BiFunction> unzipper) { return stream .map(t -> unzipper.apply(t.v1, t.v2)) .duplicate() .map1(s -> s.map(u -> u.v1)) .map2(s -> s.map(u -> u.v2)); } // [jooq-tools] START [zip-static] /** * Zip 2 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2) { return zip(seq(s1), seq(s2)); } /** * Zip 3 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3) { return zip(seq(s1), seq(s2), seq(s3)); } /** * Zip 4 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4) { return zip(seq(s1), seq(s2), seq(s3), seq(s4)); } /** * Zip 5 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5)); } /** * Zip 6 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6)); } /** * Zip 7 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7)); } /** * Zip 8 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8)); } /** * Zip 9 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9)); } /** * Zip 10 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10)); } /** * Zip 11 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11)); } /** * Zip 12 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12)); } /** * Zip 13 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13)); } /** * Zip 14 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14)); } /** * Zip 15 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15)); } /** * Zip 16 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15, Stream s16) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15), seq(s16)); } /** * Zip 2 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2) { return zip(seq(i1), seq(i2)); } /** * Zip 3 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3) { return zip(seq(i1), seq(i2), seq(i3)); } /** * Zip 4 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4) { return zip(seq(i1), seq(i2), seq(i3), seq(i4)); } /** * Zip 5 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5)); } /** * Zip 6 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6)); } /** * Zip 7 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7)); } /** * Zip 8 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8)); } /** * Zip 9 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9)); } /** * Zip 10 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10)); } /** * Zip 11 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11)); } /** * Zip 12 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12)); } /** * Zip 13 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13)); } /** * Zip 14 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Iterable i14) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), seq(i14)); } /** * Zip 15 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Iterable i14, Iterable i15) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), seq(i14), seq(i15)); } /** * Zip 16 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Iterable i14, Iterable i15, Iterable i16) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), seq(i14), seq(i15), seq(i16)); } /** * Zip 2 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2) { return zip(s1, s2, (t1, t2) -> tuple(t1, t2)) .onClose(SeqUtils.closeAll(s1, s2)); } /** * Zip 3 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3) { return zip(s1, s2, s3, (t1, t2, t3) -> tuple(t1, t2, t3)) .onClose(SeqUtils.closeAll(s1, s2, s3)); } /** * Zip 4 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4) { return zip(s1, s2, s3, s4, (t1, t2, t3, t4) -> tuple(t1, t2, t3, t4)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4)); } /** * Zip 5 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5) { return zip(s1, s2, s3, s4, s5, (t1, t2, t3, t4, t5) -> tuple(t1, t2, t3, t4, t5)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5)); } /** * Zip 6 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6) { return zip(s1, s2, s3, s4, s5, s6, (t1, t2, t3, t4, t5, t6) -> tuple(t1, t2, t3, t4, t5, t6)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6)); } /** * Zip 7 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7) { return zip(s1, s2, s3, s4, s5, s6, s7, (t1, t2, t3, t4, t5, t6, t7) -> tuple(t1, t2, t3, t4, t5, t6, t7)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7)); } /** * Zip 8 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8) { return zip(s1, s2, s3, s4, s5, s6, s7, s8, (t1, t2, t3, t4, t5, t6, t7, t8) -> tuple(t1, t2, t3, t4, t5, t6, t7, t8)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8)); } /** * Zip 9 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9) { return zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, (t1, t2, t3, t4, t5, t6, t7, t8, t9) -> tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9)); } /** * Zip 10 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10) { return zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) -> tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10)); } /** * Zip 11 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11) { return zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) -> tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11)); } /** * Zip 12 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12) { return zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) -> tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12)); } /** * Zip 13 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13) { return zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) -> tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13)); } /** * Zip 14 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14) { return zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) -> tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14)); } /** * Zip 15 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15) { return zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) -> tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15)); } /** * Zip 16 streams into one. *

*

     * // (tuple(1, "a"), tuple(2, "b"), tuple(3, "c"))
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15, Seq s16) { return zip(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) -> tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16)) .onClose(SeqUtils.closeAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16)); } /** * Zip 2 streams into one using a {@link BiFunction} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, BiFunction zipper) { return zip(seq(s1), seq(s2), zipper); } /** * Zip 3 streams into one using a {@link Function3} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Function3 zipper) { return zip(seq(s1), seq(s2), seq(s3), zipper); } /** * Zip 4 streams into one using a {@link Function4} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Function4 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), zipper); } /** * Zip 5 streams into one using a {@link Function5} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Function5 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), zipper); } /** * Zip 6 streams into one using a {@link Function6} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Function6 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), zipper); } /** * Zip 7 streams into one using a {@link Function7} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Function7 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), zipper); } /** * Zip 8 streams into one using a {@link Function8} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Function8 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), zipper); } /** * Zip 9 streams into one using a {@link Function9} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Function9 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), zipper); } /** * Zip 10 streams into one using a {@link Function10} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Function10 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), zipper); } /** * Zip 11 streams into one using a {@link Function11} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Function11 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), zipper); } /** * Zip 12 streams into one using a {@link Function12} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Function12 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), zipper); } /** * Zip 13 streams into one using a {@link Function13} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Function13 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), zipper); } /** * Zip 14 streams into one using a {@link Function14} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Function14 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), zipper); } /** * Zip 15 streams into one using a {@link Function15} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15, Function15 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15), zipper); } /** * Zip 16 streams into one using a {@link Function16} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15, Stream s16, Function16 zipper) { return zip(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15), seq(s16), zipper); } /** * Zip 2 streams into one using a {@link BiFunction} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, BiFunction zipper) { return zip(seq(i1), seq(i2), zipper); } /** * Zip 3 streams into one using a {@link Function3} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Function3 zipper) { return zip(seq(i1), seq(i2), seq(i3), zipper); } /** * Zip 4 streams into one using a {@link Function4} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Function4 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), zipper); } /** * Zip 5 streams into one using a {@link Function5} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Function5 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), zipper); } /** * Zip 6 streams into one using a {@link Function6} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Function6 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), zipper); } /** * Zip 7 streams into one using a {@link Function7} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Function7 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), zipper); } /** * Zip 8 streams into one using a {@link Function8} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Function8 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), zipper); } /** * Zip 9 streams into one using a {@link Function9} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Function9 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), zipper); } /** * Zip 10 streams into one using a {@link Function10} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Function10 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), zipper); } /** * Zip 11 streams into one using a {@link Function11} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Function11 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), zipper); } /** * Zip 12 streams into one using a {@link Function12} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Function12 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), zipper); } /** * Zip 13 streams into one using a {@link Function13} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Function13 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), zipper); } /** * Zip 14 streams into one using a {@link Function14} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Iterable i14, Function14 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), seq(i14), zipper); } /** * Zip 15 streams into one using a {@link Function15} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Iterable i14, Iterable i15, Function15 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), seq(i14), seq(i15), zipper); } /** * Zip 16 streams into one using a {@link Function16} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Iterable i14, Iterable i15, Iterable i16, Function16 zipper) { return zip(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), seq(i14), seq(i15), seq(i16), zipper); } /** * Zip 2 streams into one using a {@link BiFunction} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, BiFunction zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next()); } } return seq(new Zip()); } /** * Zip 3 streams into one using a {@link Function3} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Function3 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next()); } } return seq(new Zip()); } /** * Zip 4 streams into one using a {@link Function4} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Function4 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next()); } } return seq(new Zip()); } /** * Zip 5 streams into one using a {@link Function5} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Function5 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next()); } } return seq(new Zip()); } /** * Zip 6 streams into one using a {@link Function6} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Function6 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next()); } } return seq(new Zip()); } /** * Zip 7 streams into one using a {@link Function7} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Function7 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next()); } } return seq(new Zip()); } /** * Zip 8 streams into one using a {@link Function8} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Function8 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext() && it8.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next(), it8.next()); } } return seq(new Zip()); } /** * Zip 9 streams into one using a {@link Function9} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Function9 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext() && it8.hasNext() && it9.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next(), it8.next(), it9.next()); } } return seq(new Zip()); } /** * Zip 10 streams into one using a {@link Function10} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Function10 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext() && it8.hasNext() && it9.hasNext() && it10.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next(), it8.next(), it9.next(), it10.next()); } } return seq(new Zip()); } /** * Zip 11 streams into one using a {@link Function11} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Function11 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext() && it8.hasNext() && it9.hasNext() && it10.hasNext() && it11.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next(), it8.next(), it9.next(), it10.next(), it11.next()); } } return seq(new Zip()); } /** * Zip 12 streams into one using a {@link Function12} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Function12 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext() && it8.hasNext() && it9.hasNext() && it10.hasNext() && it11.hasNext() && it12.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next(), it8.next(), it9.next(), it10.next(), it11.next(), it12.next()); } } return seq(new Zip()); } /** * Zip 13 streams into one using a {@link Function13} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Function13 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); final Iterator it13 = s13.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext() && it8.hasNext() && it9.hasNext() && it10.hasNext() && it11.hasNext() && it12.hasNext() && it13.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next(), it8.next(), it9.next(), it10.next(), it11.next(), it12.next(), it13.next()); } } return seq(new Zip()); } /** * Zip 14 streams into one using a {@link Function14} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Function14 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); final Iterator it13 = s13.iterator(); final Iterator it14 = s14.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext() && it8.hasNext() && it9.hasNext() && it10.hasNext() && it11.hasNext() && it12.hasNext() && it13.hasNext() && it14.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next(), it8.next(), it9.next(), it10.next(), it11.next(), it12.next(), it13.next(), it14.next()); } } return seq(new Zip()); } /** * Zip 15 streams into one using a {@link Function15} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15, Function15 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); final Iterator it13 = s13.iterator(); final Iterator it14 = s14.iterator(); final Iterator it15 = s15.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext() && it8.hasNext() && it9.hasNext() && it10.hasNext() && it11.hasNext() && it12.hasNext() && it13.hasNext() && it14.hasNext() && it15.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next(), it8.next(), it9.next(), it10.next(), it11.next(), it12.next(), it13.next(), it14.next(), it15.next()); } } return seq(new Zip()); } /** * Zip 16 streams into one using a {@link Function16} to produce resulting values. *

*

     * // ("1:a", "2:b", "3:c")
     * Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq zip(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15, Seq s16, Function16 zipper) { final Iterator it1 = s1.iterator(); final Iterator it2 = s2.iterator(); final Iterator it3 = s3.iterator(); final Iterator it4 = s4.iterator(); final Iterator it5 = s5.iterator(); final Iterator it6 = s6.iterator(); final Iterator it7 = s7.iterator(); final Iterator it8 = s8.iterator(); final Iterator it9 = s9.iterator(); final Iterator it10 = s10.iterator(); final Iterator it11 = s11.iterator(); final Iterator it12 = s12.iterator(); final Iterator it13 = s13.iterator(); final Iterator it14 = s14.iterator(); final Iterator it15 = s15.iterator(); final Iterator it16 = s16.iterator(); class Zip implements Iterator { @Override public boolean hasNext() { return it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext() && it5.hasNext() && it6.hasNext() && it7.hasNext() && it8.hasNext() && it9.hasNext() && it10.hasNext() && it11.hasNext() && it12.hasNext() && it13.hasNext() && it14.hasNext() && it15.hasNext() && it16.hasNext(); } @Override public R next() { return zipper.apply(it1.next(), it2.next(), it3.next(), it4.next(), it5.next(), it6.next(), it7.next(), it8.next(), it9.next(), it10.next(), it11.next(), it12.next(), it13.next(), it14.next(), it15.next(), it16.next()); } } return seq(new Zip()); } // [jooq-tools] END [zip-static] /** * Zip a Stream with a corresponding Stream of indexes. *

*

     * // (tuple("a", 0), tuple("b", 1), tuple("c", 2))
     * Seq.of("a", "b", "c").zipWithIndex()
     * 
*/ static Seq> zipWithIndex(Stream stream) { return zipWithIndex(seq(stream)); } /** * Zip a Stream with a corresponding Stream of indexes. *

*

     * // (tuple("a", 0), tuple("b", 1), tuple("c", 2))
     * Seq.of("a", "b", "c").zipWithIndex()
     * 
*/ static Seq> zipWithIndex(Iterable iterable) { return zipWithIndex(seq(iterable)); } /** * Zip a Stream with a corresponding Stream of indexes. *

*

     * // (tuple("a", 0), tuple("b", 1), tuple("c", 2))
     * Seq.of("a", "b", "c").zipWithIndex()
     * 
*/ static Seq> zipWithIndex(Seq stream) { long[] index = { -1L }; return SeqUtils.transform(stream, (delegate, action) -> delegate.tryAdvance(t -> action.accept(tuple(t, index[0] = index[0] + 1)) ) ); } /** * Fold a stream to the left. *

*

     * // "abc"
     * Seq.of("a", "b", "c").foldLeft("", (u, t) -> u + t)
     * 
*/ static U foldLeft(Stream stream, U seed, BiFunction function) { return foldLeft(seq(stream), seed, function); } /** * Fold a stream to the left. *

*

     * // "abc"
     * Seq.of("a", "b", "c").foldLeft("", (u, t) -> u + t)
     * 
*/ static U foldLeft(Iterable iterable, U seed, BiFunction function) { return foldLeft(seq(iterable), seed, function); } /** * Fold a stream to the left. *

*

     * // "abc"
     * Seq.of("a", "b", "c").foldLeft("", (u, t) -> u + t)
     * 
*/ static U foldLeft(Seq stream, U seed, BiFunction function) { final Iterator it = stream.iterator(); U result = seed; while (it.hasNext()) result = function.apply(result, it.next()); return result; } /** * Fold a stream to the right. *

*

     * // "cba"
     * Seq.of("a", "b", "c").foldRight("", (t, u) -> u + t)
     * 
*/ static U foldRight(Stream stream, U seed, BiFunction function) { return foldRight(seq(stream), seed, function); } /** * Fold a stream to the right. *

*

     * // "cba"
     * Seq.of("a", "b", "c").foldRight("", (t, u) -> u + t)
     * 
*/ static U foldRight(Iterable iterable, U seed, BiFunction function) { return foldRight(seq(iterable), seed, function); } /** * Fold a stream to the right. *

*

     * // "cba"
     * Seq.of("a", "b", "c").foldRight("", (t, u) -> u + t)
     * 
*/ static U foldRight(Seq stream, U seed, BiFunction function) { return stream.reverse().foldLeft(seed, (u, t) -> function.apply(t, u)); } /** * Scan a stream to the left. *

*

     * // ("", "a", "ab", "abc")
     * Seq.of("a", "b", "c").scanLeft("", (u, t) -> u + t)
     * 
*/ static Seq scanLeft(Stream stream, U seed, BiFunction function) { return scanLeft(seq(stream), seed, function); } /** * Scan a stream to the left. *

*

     * // ("", "a", "ab", "abc")
     * Seq.of("a", "b", "c").scanLeft("", (u, t) -> u + t)
     * 
*/ static Seq scanLeft(Iterable iterable, U seed, BiFunction function) { return scanLeft(seq(iterable), seed, function); } /** * Scan a stream to the left. *

*

     * // ("", "a", "ab", "abc")
     * Seq.of("a", "b", "c").scanLeft("", (u, t) -> u + t)
     * 
*/ static Seq scanLeft(Seq stream, U seed, BiFunction function) { @SuppressWarnings("unchecked") U[] value = (U[]) new Object[] { seed }; return Seq.of(seed).concat(SeqUtils.transform(stream, (delegate, action) -> delegate.tryAdvance(t -> action.accept(value[0] = function.apply(value[0], t)) ) )); } /** * Scan a stream to the right. *

*

     * // ("", "c", "cb", "cba")
     * Seq.of("a", "b", "c").scanRight("", (t, u) -> u + t)
     * 
*/ static Seq scanRight(Stream stream, U seed, BiFunction function) { return scanRight(seq(stream), seed, function); } /** * Scan a stream to the right. *

*

     * // ("", "c", "cb", "cba")
     * Seq.of("a", "b", "c").scanRight("", (t, u) -> u + t)
     * 
*/ static Seq scanRight(Iterable iterable, U seed, BiFunction function) { return scanRight(seq(iterable), seed, function); } /** * Scan a stream to the right. *

*

     * // ("", "c", "cb", "cba")
     * Seq.of("a", "b", "c").scanRight("", (t, u) -> u + t)
     * 
*/ static Seq scanRight(Seq stream, U seed, BiFunction function) { return stream.reverse().scanLeft(seed, (u, t) -> function.apply(t, u)); } /** * Unfold a function into a stream. *

*

     * // (1, 2, 3, 4, 5)
     * Seq.unfold(1, i -> i <= 6 ? Optional.of(tuple(i, i + 1)) : Optional.empty())
     * 
*/ @SuppressWarnings({ "rawtypes", "unchecked" }) static Seq unfold(U seed, Function>> unfolder) { Tuple2[] unfolded = new Tuple2[] { tuple((T) null, seed) }; return seq((FunctionalSpliterator) action -> { Optional> result = unfolder.apply(unfolded[0].v2); if (result.isPresent()) action.accept((unfolded[0] = result.get()).v1); return result.isPresent(); }); } /** * Reverse a stream. *

*

     * // (3, 2, 1)
     * Seq.of(1, 2, 3).reverse()
     * 
*/ static Seq reverse(Stream stream) { return reverse(seq(stream)); } /** * Reverse a stream. *

*

     * // (3, 2, 1)
     * Seq.of(1, 2, 3).reverse()
     * 
*/ static Seq reverse(Iterable iterable) { return reverse(seq(iterable)); } /** * Reverse a stream. *

*

     * // (3, 2, 1)
     * Seq.of(1, 2, 3).reverse()
     * 
*/ static Seq reverse(Seq stream) { List list = toList(stream); Collections.reverse(list); return seq(list).onClose(stream::close); } /** * Shuffle a stream *

*

     * // e.g. (2, 3, 1)
     * Seq.of(1, 2, 3).shuffle()
     * 
*/ static Seq shuffle(Stream stream) { return shuffle(seq(stream)); } /** * Shuffle a stream *

*

     * // e.g. (2, 3, 1)
     * Seq.of(1, 2, 3).shuffle()
     * 
*/ static Seq shuffle(Iterable iterable) { return shuffle(seq(iterable)); } /** * Shuffle a stream *

*

     * // e.g. (2, 3, 1)
     * Seq.of(1, 2, 3).shuffle()
     * 
*/ static Seq shuffle(Seq stream) { return shuffle(stream, null); } /** * Shuffle a stream using specified source of randomness *

*

     * // e.g. (2, 3, 1)
     * Seq.of(1, 2, 3).shuffle(new Random())
     * 
*/ static Seq shuffle(Stream stream, Random random) { return shuffle(seq(stream), random); } /** * Shuffle a stream using specified source of randomness *

*

     * // e.g. (2, 3, 1)
     * Seq.of(1, 2, 3).shuffle(new Random())
     * 
*/ static Seq shuffle(Iterable iterable, Random random) { return shuffle(seq(iterable), random); } /** * Shuffle a stream using specified source of randomness *

*

     * // e.g. (2, 3, 1)
     * Seq.of(1, 2, 3).shuffle(new Random())
     * 
*/ static Seq shuffle(Seq stream, Random random) { Spliterator[] shuffled = new Spliterator[1]; return SeqUtils.transform(stream, (delegate, action) -> { if (shuffled[0] == null) { List list = seq(delegate).toList(); if (random == null) Collections.shuffle(list); else Collections.shuffle(list, random); shuffled[0] = list.spliterator(); } return shuffled[0].tryAdvance(action); }).onClose(stream::close); } // [jooq-tools] START [crossjoin-static] /** * Cross join 2 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2) { return crossJoin(seq(s1), seq(s2)); } /** * Cross join 3 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3) { return crossJoin(seq(s1), seq(s2), seq(s3)); } /** * Cross join 4 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4)); } /** * Cross join 5 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5)); } /** * Cross join 6 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6)); } /** * Cross join 7 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7)); } /** * Cross join 8 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8)); } /** * Cross join 9 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9)); } /** * Cross join 10 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10)); } /** * Cross join 11 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11)); } /** * Cross join 12 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12)); } /** * Cross join 13 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13)); } /** * Cross join 14 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14)); } /** * Cross join 15 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15)); } /** * Cross join 16 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Stream s1, Stream s2, Stream s3, Stream s4, Stream s5, Stream s6, Stream s7, Stream s8, Stream s9, Stream s10, Stream s11, Stream s12, Stream s13, Stream s14, Stream s15, Stream s16) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq(s6), seq(s7), seq(s8), seq(s9), seq(s10), seq(s11), seq(s12), seq(s13), seq(s14), seq(s15), seq(s16)); } /** * Cross join 2 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2) { return crossJoin(seq(i1), seq(i2)); } /** * Cross join 3 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3) { return crossJoin(seq(i1), seq(i2), seq(i3)); } /** * Cross join 4 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4)); } /** * Cross join 5 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5)); } /** * Cross join 6 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6)); } /** * Cross join 7 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7)); } /** * Cross join 8 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8)); } /** * Cross join 9 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9)); } /** * Cross join 10 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10)); } /** * Cross join 11 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11)); } /** * Cross join 12 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12)); } /** * Cross join 13 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13)); } /** * Cross join 14 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Iterable i14) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), seq(i14)); } /** * Cross join 15 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Iterable i14, Iterable i15) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), seq(i14), seq(i15)); } /** * Cross join 16 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Iterable i1, Iterable i2, Iterable i3, Iterable i4, Iterable i5, Iterable i6, Iterable i7, Iterable i8, Iterable i9, Iterable i10, Iterable i11, Iterable i12, Iterable i13, Iterable i14, Iterable i15, Iterable i16) { return crossJoin(seq(i1), seq(i2), seq(i3), seq(i4), seq(i5), seq(i6), seq(i7), seq(i8), seq(i9), seq(i10), seq(i11), seq(i12), seq(i13), seq(i14), seq(i15), seq(i16)); } /** * Cross join 2 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2) { List list = s2.toList(); return seq(s1).flatMap(v1 -> seq(list).map(v2 -> tuple(v1, v2))) .onClose(SeqUtils.closeAll(s1, s2)); } /** * Cross join 3 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3) { List> list = crossJoin(s2, s3).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2))) .onClose(SeqUtils.closeAll(s2, s3)); } /** * Cross join 4 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4) { List> list = crossJoin(s2, s3, s4).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3))) .onClose(SeqUtils.closeAll(s2, s3, s4)); } /** * Cross join 5 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5) { List> list = crossJoin(s2, s3, s4, s5).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5)); } /** * Cross join 6 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6) { List> list = crossJoin(s2, s3, s4, s5, s6).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6)); } /** * Cross join 7 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7) { List> list = crossJoin(s2, s3, s4, s5, s6, s7).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7)); } /** * Cross join 8 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8) { List> list = crossJoin(s2, s3, s4, s5, s6, s7, s8).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, t.v7))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7, s8)); } /** * Cross join 9 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9) { List> list = crossJoin(s2, s3, s4, s5, s6, s7, s8, s9).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7, s8, s9)); } /** * Cross join 10 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10) { List> list = crossJoin(s2, s3, s4, s5, s6, s7, s8, s9, s10).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7, s8, s9, s10)); } /** * Cross join 11 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11) { List> list = crossJoin(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9, t.v10))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11)); } /** * Cross join 12 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12) { List> list = crossJoin(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9, t.v10, t.v11))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12)); } /** * Cross join 13 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13) { List> list = crossJoin(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9, t.v10, t.v11, t.v12))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13)); } /** * Cross join 14 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14) { List> list = crossJoin(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9, t.v10, t.v11, t.v12, t.v13))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14)); } /** * Cross join 15 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15) { List> list = crossJoin(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9, t.v10, t.v11, t.v12, t.v13, t.v14))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15)); } /** * Cross join 16 streams into one. *

*

     * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
     * Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
     * 
*/ @Generated("This method was generated using jOOQ-tools") static Seq> crossJoin(Seq s1, Seq s2, Seq s3, Seq s4, Seq s5, Seq s6, Seq s7, Seq s8, Seq s9, Seq s10, Seq s11, Seq s12, Seq s13, Seq s14, Seq s15, Seq s16) { List> list = crossJoin(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16).toList(); return s1.flatMap(v1 -> seq(list).map(t -> tuple(v1, t.v1, t.v2, t.v3, t.v4, t.v5, t.v6, t.v7, t.v8, t.v9, t.v10, t.v11, t.v12, t.v13, t.v14, t.v15))) .onClose(SeqUtils.closeAll(s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16)); } // [jooq-tools] END [crossjoin-static] /** * Concatenate a number of streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).concat(Seq.of(4, 5, 6))
     * 
*/ @SafeVarargs @SuppressWarnings({ "unchecked" }) static Seq concat(Stream... streams) { return concat(SeqUtils.seqs(streams)); } /** * Concatenate a number of streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).concat(Seq.of(4, 5, 6))
     * 
*/ @SafeVarargs @SuppressWarnings({ "unchecked" }) static Seq concat(Iterable... iterables) { return concat(SeqUtils.seqs(iterables)); } /** * Concatenate a number of streams. *

*

     * // (1, 2, 3, 4, 5, 6)
     * Seq.of(1, 2, 3).concat(Seq.of(4, 5, 6))
     * 
*/ @SafeVarargs static Seq concat(Seq... streams) { if (streams == null || streams.length == 0) return Seq.empty(); if (streams.length == 1) return seq(streams[0]); Stream result = streams[0]; for (int i = 1; i < streams.length; i++) result = Stream.concat(result, streams[i]); return seq(result); } /** * Concatenate a number of optionals. *

*

     * // (1, 2)
     * Seq.concat(Optional.of(1), Optional.empty(), Optional.of(2))
     * 
*/ @SafeVarargs static Seq concat(Optional... optionals) { if (optionals == null) return null; return Seq.of(optionals).filter(Optional::isPresent).map(Optional::get); } /** * Duplicate a Streams into two equivalent Streams. *

*

     * // tuple((1, 2, 3), (1, 2, 3))
     * Seq.of(1, 2, 3).duplicate()
     * 
*/ static Tuple2, Seq> duplicate(Stream stream) { final Iterator it = stream.iterator(); final LinkedList gap = new LinkedList<>(); @SuppressWarnings("unchecked") final Iterator[] ahead = new Iterator[] { null }; class Duplicate implements Iterator { @Override public boolean hasNext() { if (ahead[0] == null || ahead[0] == this) return it.hasNext(); return !gap.isEmpty(); } @Override public T next() { if (ahead[0] == null) ahead[0] = this; if (ahead[0] == this) { T value = it.next(); gap.offer(value); return value; } else { T value = gap.poll(); if (gap.isEmpty()) ahead[0] = null; return value; } } } return tuple(seq(new Duplicate()), seq(new Duplicate())); } /** * Consume a stream and concatenate all elements. */ static String toString(Stream stream) { return toString(stream, ""); } /** * Consume a stream and concatenate all elements using a separator. */ static String toString(Stream stream, CharSequence delimiter) { return stream.map(Objects::toString).collect(Collectors.joining(delimiter)); } /** * Collect a Stream into a List. */ static > C toCollection(Stream stream, Supplier collectionFactory) { return stream.collect(Collectors.toCollection(collectionFactory)); } /** * Collect a Stream into a List. */ static List toList(Stream stream) { return stream.collect(Collectors.toList()); } /** * Collect a Stream into a Set. */ static Set toSet(Stream stream) { return stream.collect(Collectors.toSet()); } /** * Collect a Stream of {@link Tuple2} into a Map. */ static Map toMap(Stream> stream) { return stream.collect(Collectors.toMap(Tuple2::v1, Tuple2::v2)); } /** * Collect a Stream into a Map. */ static Map toMap(Stream stream, Function keyMapper, Function valueMapper) { return stream.collect(Collectors.toMap(keyMapper, valueMapper)); } /** * Returns a limited interval from a given Stream. *

*

     * // (4, 5)
     * Seq.of(1, 2, 3, 4, 5, 6).slice(3, 5)
     * 
*/ static Seq slice(Stream stream, long from, long to) { long f = Math.max(from, 0); long t = Math.max(to - f, 0); return seq(stream.skip(f).limit(t)); } /** * Returns a stream with n elements skipped. *

*

     * // (4, 5, 6)
     * Seq.of(1, 2, 3, 4, 5, 6).skip(3)
     * 
*/ static Seq skip(Stream stream, long elements) { return seq(stream.skip(elements)); } /** * Returns a stream with all elements skipped for which a predicate evaluates to true. *

*

     * // (3, 4, 5)
     * Seq.of(1, 2, 3, 4, 5).skipWhile(i -> i < 3)
     * 
*/ static Seq skipWhile(Stream stream, Predicate predicate) { return skipUntil(stream, predicate.negate()); } /** * Returns a stream with all elements skipped for which a predicate evaluates to true * plus the first element for which it evaluates to false. *

*

     * // (4, 5)
     * Seq.of(1, 2, 3, 4, 5).skipWhileClosed(i -> i < 3)
     * 
*/ static Seq skipWhileClosed(Stream stream, Predicate predicate) { return skipUntilClosed(stream, predicate.negate()); } /** * Returns a stream with all elements skipped for which a predicate evaluates to false. *

*

     * // (3, 4, 5)
     * Seq.of(1, 2, 3, 4, 5).skipUntil(i -> i == 3)
     * 
*/ @SuppressWarnings("unchecked") static Seq skipUntil(Stream stream, Predicate predicate) { boolean[] test = { false }; return SeqUtils.transform(stream, (delegate, action) -> !test[0] ? delegate.tryAdvance(t -> { if (test[0] = predicate.test(t)) action.accept(t); }) : delegate.tryAdvance(action) ); } /** * Returns a stream with all elements skipped for which a predicate evaluates to false * plus the first element for which it evaluates to true. *

*

     * // (4, 5)
     * Seq.of(1, 2, 3, 4, 5).skipUntilClosed(i -> i == 3)
     * 
*/ @SuppressWarnings("unchecked") static Seq skipUntilClosed(Stream stream, Predicate predicate) { boolean[] test = { false }; return SeqUtils.transform(stream, (delegate, action) -> !test[0] ? delegate.tryAdvance(t -> test[0] = predicate.test(t)) : delegate.tryAdvance(action) ); } /** * Returns a stream limited to n elements. *

*

     * // (1, 2, 3)
     * Seq.of(1, 2, 3, 4, 5, 6).limit(3)
     * 
*/ static Seq limit(Stream stream, long elements) { return seq(stream.limit(elements)); } /** * Alias for limit * * @see Seq#limit(long) */ default Seq take(long maxSize) { return limit(maxSize); } /** * Alias for skip * * @see Seq#skip(long) */ default Seq drop(long n) { return skip(n); } /** * Returns a stream limited to all elements for which a predicate evaluates to true. *

*

     * // (1, 2)
     * Seq.of(1, 2, 3, 4, 5).limitWhile(i -> i < 3)
     * 
*/ static Seq limitWhile(Stream stream, Predicate predicate) { return limitUntil(stream, predicate.negate()); } /** * Returns a stream limited to all elements for which a predicate evaluates to true * plus the first element for which it evaluates to false. *

*

     * // (1, 2, 3)
     * Seq.of(1, 2, 3, 4, 5).limitWhileClosed(i -> i < 3)
     * 
*/ static Seq limitWhileClosed(Stream stream, Predicate predicate) { return limitUntilClosed(stream, predicate.negate()); } /** * Returns a stream limited to all elements for which a predicate evaluates to false. *

*

     * // (1, 2)
     * Seq.of(1, 2, 3, 4, 5).limitUntil(i -> i == 3)
     * 
*/ @SuppressWarnings("unchecked") static Seq limitUntil(Stream stream, Predicate predicate) { boolean[] test = { false }; return SeqUtils.transform(stream, (delegate, action) -> delegate.tryAdvance(t -> { if (!(test[0] = predicate.test(t))) action.accept(t); }) && !test[0] ); } /** * Returns a stream limited to all elements for which a predicate evaluates to false * plus the first element for which it evaluates to true. *

*

     * // (1, 2, 3)
     * Seq.of(1, 2, 3, 4, 5).limitUntilClosed(i -> i == 3)
     * 
*/ @SuppressWarnings("unchecked") static Seq limitUntilClosed(Stream stream, Predicate predicate) { boolean[] test = { false }; return SeqUtils.transform(stream, (delegate, action) -> !test[0] && delegate.tryAdvance(t -> { test[0] = predicate.test(t); action.accept(t); }) ); } /** * Returns a stream with a given value interspersed between any two values of this stream. *

*

     * // (1, 0, 2, 0, 3, 0, 4)
     * Seq.of(1, 2, 3, 4).intersperse(0)
     * 
*/ static Seq intersperse(Stream stream, T value) { return seq(stream.flatMap(t -> Stream.of(value, t)).skip(1)); } /** * Classify this stream's elements according to a given classifier function *

*

     * // Seq(tuple(1, Seq(1, 3, 5)), tuple(0, Seq(2, 4, 6)))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 )
     * // Seq(tuple(true, Seq(1, 3, 5)), tuple(false, Seq(2, 4, 6)))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 != 0)
     * 
* * This is a non-terminal analog of {@link #groupBy(Stream, Function)}) * @see #groupBy(Function) * @see #partition(Predicate) */ public static Seq>> grouped(Stream stream, Function classifier) { return grouped(seq(stream), classifier); } /** * Classify this stream's elements according to a given classifier function *

*

     * // Seq(tuple(1, Seq(1, 3, 5)), tuple(0, Seq(2, 4, 6)))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 )
     * // Seq(tuple(true, Seq(1, 3, 5)), tuple(false, Seq(2, 4, 6)))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 != 0)
     * 
* * This is a non-terminal analog of {@link #groupBy(Stream, Function)}) * @see #groupBy(Function) * @see #partition(Predicate) */ public static Seq>> grouped(Iterable iterable, Function classifier) { return grouped(seq(iterable), classifier); } /** * Classify this stream's elements according to a given classifier function *

*

     * // Seq(tuple(1, Seq(1, 3, 5)), tuple(0, Seq(2, 4, 6)))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 )
     * // Seq(tuple(true, Seq(1, 3, 5)), tuple(false, Seq(2, 4, 6)))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 != 0)
     * 
* * This is a non-terminal analog of {@link #groupBy(Stream, Function)}) * @see #groupBy(Function) * @see #partition(Predicate) */ public static Seq>> grouped(Seq seq, Function classifier) { final Iterator it = seq.iterator(); class ClassifyingIterator implements Iterator>> { final Map> buffers = new LinkedHashMap<>(); final Queue keys = new LinkedList<>(); class Classification implements Iterator { final K key; Queue buffer; Classification(K key) { this.key = key; } void fetchClassification() { if (buffer == null) buffer = buffers.get(key); while (buffer.isEmpty() && it.hasNext()) fetchNextNewKey(); } @Override public boolean hasNext() { fetchClassification(); return !buffer.isEmpty(); } @Override public T next() { return buffer.poll(); } } void fetchClassifying() { while (it.hasNext() && fetchNextNewKey()); } boolean fetchNextNewKey() { T next = it.next(); K nextK = classifier.apply(next); Queue buffer = buffers.get(nextK); try { if (buffer == null) { buffer = new ArrayDeque<>(); buffers.put(nextK, buffer); keys.add(nextK); return true; } } finally { buffer.offer(next); } return false; } @Override public boolean hasNext() { fetchClassifying(); return !keys.isEmpty(); } @Override public Tuple2> next() { K nextK = keys.poll(); return tuple(nextK, seq(new Classification(nextK))); } } return seq(new ClassifyingIterator()).onClose(seq::close); } /** * Classify this stream's elements according to a given classifier function * and collect each class's elements using a collector. *

*

     * // Seq(tuple(1, 9), tuple(0, 12))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2, Collectors.summingInt(i -> i))
     * // Seq(tuple(true, 9), tuple(false, 12))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 != 0, Collectors.summingInt(i -> i))
     * 
This is a non-terminal analog of * {@link #groupBy(Function, Collector)}) * * @see #groupBy(Function, Collector) */ public static Seq> grouped(Stream stream, Function classifier, Collector downstream) { return grouped(seq(stream), classifier, downstream); } /** * Classify this stream's elements according to a given classifier function * and collect each class's elements using a collector. *

*

     * // Seq(tuple(1, 9), tuple(0, 12))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2, Collectors.summingInt(i -> i))
     * // Seq(tuple(true, 9), tuple(false, 12))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 != 0, Collectors.summingInt(i -> i))
     * 
This is a non-terminal analog of * {@link #groupBy(Function, Collector)}) * * @see #groupBy(Function, Collector) */ public static Seq> grouped(Iterable iterable, Function classifier, Collector downstream) { return grouped(seq(iterable), classifier, downstream); } /** * Classify this stream's elements according to a given classifier function * and collect each class's elements using a collector. *

*

     * // Seq(tuple(1, 9), tuple(0, 12))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2, Collectors.summingInt(i -> i))
     * // Seq(tuple(true, 9), tuple(false, 12))
     * Seq.of(1, 2, 3, 4, 5, 6).grouped(i -> i % 2 != 0, Collectors.summingInt(i -> i))
     * 
This is a non-terminal analog of * {@link #groupBy(Function, Collector)}) * * @see #groupBy(Function, Collector) */ public static Seq> grouped(Seq seq, Function classifier, Collector downstream) { return grouped(seq, classifier).map(t -> tuple(t.v1, t.v2.collect(downstream))); } /** * Partition a stream into two given a predicate. *

*

     * // tuple((1, 3, 5), (2, 4, 6))
     * Seq.of(1, 2, 3, 4, 5, 6).partition(i -> i % 2 != 0)
     * 
*/ static Tuple2, Seq> partition(Stream stream, Predicate predicate) { final Iterator it = stream.iterator(); final LinkedList buffer1 = new LinkedList<>(); final LinkedList buffer2 = new LinkedList<>(); class Partition implements Iterator { final boolean b; Partition(boolean b) { this.b = b; } void fetch() { while (buffer(b).isEmpty() && it.hasNext()) { T next = it.next(); buffer(predicate.test(next)).offer(next); } } LinkedList buffer(boolean test) { return test ? buffer1 : buffer2; } @Override public boolean hasNext() { fetch(); return !buffer(b).isEmpty(); } @Override public T next() { return buffer(b).poll(); } } return tuple(seq(new Partition(true)), seq(new Partition(false))); } /** * Split a stream at a given position. *

*

     * // tuple((1, 2, 3), (4, 5, 6))
     * Seq.of(1, 2, 3, 4, 5, 6).splitAt(3)
     * 
*/ static Tuple2, Seq> splitAt(Stream stream, long position) { return seq(stream) .zipWithIndex() .partition(t -> t.v2 < position) // Explicit type parameters to work around this Eclipse compiler bug: // https://bugs.eclipse.org/bugs/show_bug.cgi?id=455945 .map((v1, v2) -> Tuple., Seq>tuple( v1.map(t -> t.v1), v2.map(t -> t.v1) )); } /** * Split a stream at the head. *

*

     * // tuple(1, (2, 3, 4, 5, 6))
     * Seq.of(1, 2, 3, 4, 5, 6).splitHead(3)
     * 
*/ static Tuple2, Seq> splitAtHead(Stream stream) { Iterator it = stream.iterator(); return tuple(it.hasNext() ? Optional.of(it.next()) : Optional.empty(), seq(it)); } // Methods taken from LINQ // ----------------------- /** * Keep only those elements in a stream that are of a given type. *

*

     * // (1, 2, 3)
     * Seq.of(1, "a", 2, "b", 3).ofType(Integer.class)
     * 
*/ @SuppressWarnings("unchecked") static Seq ofType(Stream stream, Class type) { return seq(stream).filter(type::isInstance).map(t -> (U) t); } /** * Cast all elements in a stream to a given type, possibly throwing a {@link ClassCastException}. *

*

     * // ClassCastException
     * Seq.of(1, "a", 2, "b", 3).cast(Integer.class)
     * 
*/ static Seq cast(Stream stream, Class type) { return seq(stream).map(type::cast); } // Shortcuts to Collectors // ----------------------- /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#groupingBy(Function)} collector. */ static Map> groupBy(Stream stream, Function classifier) { return seq(stream).groupBy(classifier); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#groupingBy(Function, Collector)} collector. */ static Map groupBy(Stream stream, Function classifier, Collector downstream) { return seq(stream).groupBy(classifier, downstream); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#groupingBy(Function, Supplier, Collector)} collector. */ static > M groupBy(Stream stream, Function classifier, Supplier mapFactory, Collector downstream) { return seq(stream).groupBy(classifier, mapFactory, downstream); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#joining()} * collector. * * @deprecated - Use {@link #toString()} instead. This method will be * removed in the future as it causes confusion with * {@link #innerJoin(Seq, BiPredicate)}. */ @Deprecated static String join(Stream stream) { return seq(stream).join(); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#joining(CharSequence)} * collector. * * @deprecated - Use {@link #toString()} instead. This method will be * removed in the future as it causes confusion with * {@link #innerJoin(Seq, BiPredicate)}. */ @Deprecated static String join(Stream stream, CharSequence delimiter) { return seq(stream).join(delimiter); } /** * Shortcut for calling {@link Stream#collect(Collector)} with a * {@link Collectors#joining(CharSequence, CharSequence, CharSequence)} * collector. * * @deprecated - Use {@link #toString()} instead. This method will be * removed in the future as it causes confusion with * {@link #innerJoin(Seq, BiPredicate)}. */ @Deprecated static String join(Stream stream, CharSequence delimiter, CharSequence prefix, CharSequence suffix) { return seq(stream).join(delimiter, prefix, suffix); } // Covariant overriding of Stream return types // ------------------------------------------- @Override Seq filter(Predicate predicate); @Override Seq map(Function mapper); @Override IntStream mapToInt(ToIntFunction mapper); @Override LongStream mapToLong(ToLongFunction mapper); @Override DoubleStream mapToDouble(ToDoubleFunction mapper); @Override Seq flatMap(Function> mapper); @Override IntStream flatMapToInt(Function mapper); @Override LongStream flatMapToLong(Function mapper); @Override DoubleStream flatMapToDouble(Function mapper); @Override Seq distinct(); @Override Seq sorted(); @Override Seq sorted(Comparator comparator); @Override Seq peek(Consumer action); @Override Seq limit(long maxSize); @Override Seq skip(long n); @Override Seq onClose(Runnable closeHandler); @Override void close(); @Override long count(); // These methods have no effect // ---------------------------- /** * Returns this stream. All Seq streams are sequential, hence the name. * * @return this stream unmodified */ @Override default Seq sequential() { return this; } /** * Seq streams are always sequential and, as such, doesn't support * parallelization. * * @return this sequential stream unmodified * @see jOOL Issue #130 */ @Override default Seq parallel() { return this; } /** * Returns this stream. All Seq streams are ordered so this method has * no effect. * * @return this stream unmodified */ @Override default Seq unordered() { return this; } @Override default Spliterator spliterator() { return Iterable.super.spliterator(); } @Override default void forEach(Consumer action) { Iterable.super.forEach(action); } // Debugging tools // --------------- /** * Generate a nicely formatted representation of this stream. *

* Clients should not rely on the concrete formatting of this method, which * is intended for debugging convenience only. */ String format(); /** * Print contents of this stream to {@link System#out}. */ default void printOut() { print(System.out); } /** * Print contents of this stream to {@link System#err}. */ default void printErr() { print(System.err); } /** * Print contents of this stream to the argument writer. */ default void print(PrintWriter writer) { forEach(writer::println); } /** * Print contents of this stream to the argument stream. */ default void print(PrintStream stream) { forEach(stream::println); } }