Java Stream Operation concat(Stream... streams)

Here you can find the source of concat(Stream... streams)

Description

Concats any number of Streams not just 2 as in Stream#concat(Stream,Stream) .

License

Open Source License

Declaration

    @SafeVarargs
public static <T> Stream<T> concat(Stream<T>... streams) 

Method Source Code

    //package com.java2s;
    //License from project: Open Source License 

    import java.util.stream.Stream;

    public class Main {
        /**/*from w w w .java2  s  . c o  m*/
         * Concats any number of Streams not just 2 as in {@link Stream#concat(Stream, Stream)}.
         * @since 2016.04
         */
        @SafeVarargs
public static <T> Stream<T> concat(Stream<T>... streams) {
    return Stream.of(streams).reduce(Stream::concat).orElse(Stream.empty());
}
    }

Related

  1. cast(Stream stream, Class type)
  2. cat(Stream... streams)
  3. characterStream2(String s)
  4. commaSeparated(Stream stream)
  5. concat(IntStream... streams)
  6. containsOnly(Stream stream, long size)
  7. createStream(final Iterator iterator)
  8. endsWith(Stream stream, Iterable iterable)
  9. enumerationAsStream(Enumeration e)