Java Stream Operation concat(IntStream... streams)

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

Description

concat

License

Open Source License

Declaration

public static IntStream concat(IntStream... streams) 

Method Source Code


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

import java.util.Arrays;

import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class Main {
    public static IntStream concat(IntStream... streams) {
        return Arrays.stream(streams).reduce(IntStream::concat).orElse(IntStream.empty());
    }//from   ww  w . ja  v a  2  s .c o  m

    public static DoubleStream concat(DoubleStream... streams) {
        return Arrays.stream(streams).reduce(DoubleStream::concat).orElse(DoubleStream.empty());
    }

    public static <T> Stream<T> concat(Stream<? extends T>... streams) {
        return (Stream<T>) Arrays.stream(streams).reduce(Stream::concat).orElse(Stream.empty());
    }
}

Related

  1. bytesToIntStream(byte[] bytes)
  2. cast(Stream stream, Class type)
  3. cat(Stream... streams)
  4. characterStream2(String s)
  5. commaSeparated(Stream stream)
  6. concat(Stream... streams)
  7. containsOnly(Stream stream, long size)
  8. createStream(final Iterator iterator)
  9. endsWith(Stream stream, Iterable iterable)