Java Stream Join join(Stream vals)

Here you can find the source of join(Stream vals)

Description

join

License

Open Source License

Declaration

public static String join(Stream<String> vals) 

Method Source Code


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

import static java.util.stream.Collectors.*;

import java.util.stream.Stream;

public class Main {
    public static String join(Stream<String> vals) {

        return vals.filter(s -> s != null).collect(joining());
    }/*from ww  w  . ja  v  a 2 s  .co  m*/
}

Related

  1. join(final String delimiter, final Stream stream)
  2. join(Stream stream)
  3. joinStringsAsArguments(Stream arguments)