Java Stream Join join(final String delimiter, final Stream stream)

Here you can find the source of join(final String delimiter, final Stream stream)

Description

join

License

Creative Commons License

Declaration

private static String join(final String delimiter, final Stream<String> stream) 

Method Source Code

//package com.java2s;
/*/* w w w.j a v a2 s  .c  o m*/
 * Copyright (c) 2013 - 2015 Naios <naios-dev@live.de>
 *
 * This file is part of WIde which is released under Creative Commons 4.0 (by-nc-sa)
 * See file LICENSE for full license details.
 */

import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Main {
    private static String join(final String delimiter, final Stream<String> stream) {
        return stream.collect(Collectors.joining(delimiter));
    }
}

Related

  1. join(Stream vals)
  2. join(Stream stream)
  3. joinStringsAsArguments(Stream arguments)