mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
11 lines
287 B
Java
11 lines
287 B
Java
// "Replace with collect" "true"
|
|
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Test {
|
|
static String test(List<String> list) {
|
|
String sb = list.stream().filter(s -> !s.isEmpty()).collect(Collectors.joining(",", "[", "]"));
|
|
return sb.trim();
|
|
}
|
|
} |