mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-20 11:50:57 +07:00
23 lines
555 B
Java
23 lines
555 B
Java
|
|
import java.util.*;
|
|
import java.util.function.Function;
|
|
import java.util.stream.Collector;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import java.util.Map;
|
|
import java.util.stream.Collector;
|
|
|
|
class FooBar {
|
|
|
|
void p(Map<String, String> m) {
|
|
m.entrySet().stream()
|
|
.collect(Collector.of(() -> new HashMap<>(),
|
|
(a, e) -> a.put(e.getValue(), e.getKey()),
|
|
(l, r) -> {
|
|
l.put<caret>All(r);
|
|
return l;
|
|
}));
|
|
}
|
|
}
|