mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-21 13:20:56 +07:00
14 lines
328 B
Java
14 lines
328 B
Java
|
|
import java.util.Map;
|
|
import static java.util.stream.Collectors.toMap;
|
|
|
|
class Test {
|
|
Map<? extends Enum<?>, String> getValueByEnum() {
|
|
return null;
|
|
}
|
|
|
|
Map<String, ? extends Enum<?>> getEnumByValue() {
|
|
return getValueByEnum().entrySet().stream()
|
|
.collect(toMap(Map.Entry::getValue, Map.Entry::getKey));
|
|
}
|
|
} |