mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-20 11:36:16 +07:00
10 lines
352 B
Java
10 lines
352 B
Java
// "Replace 'collect(reducing())' with 'reduce()' (may change semantics when result is null)" "true"
|
|
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Main {
|
|
public Optional<String> concat(List<String> data) {
|
|
return data.stream().filter(x -> x.startsWith("xyz")).colle<caret>ct(Collectors.reducing(String::concat));
|
|
}
|
|
} |