mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-01 21:20:54 +07:00
9 lines
227 B
Java
9 lines
227 B
Java
import java.util.stream.Collectors;
|
|
import java.util.stream.Stream;
|
|
|
|
class Test {
|
|
void foo(final Stream<String> stream){
|
|
stream.collect(Collectors.toMap(s -> s, s -> s, (a, b) -> a.length() > b. length() ? a : b));
|
|
}
|
|
}
|