mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-22 20:49:52 +07:00
10 lines
331 B
Java
10 lines
331 B
Java
// "Replace 'collect(mapping())' with 'map().collect()'" "true"
|
|
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Main {
|
|
public List<Integer> sizes(List<String> data) {
|
|
return data.stream().filter(x -> x.startsWith("xyz")).collect(Collectors.mapping(Str<caret>ing::length, Collectors.toList()));
|
|
}
|
|
} |