mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
10 lines
332 B
Java
10 lines
332 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
private static Optional<String> max(Map<String, List<String>> dependencies, String fruits, Map<String, String> weights) {
|
|
return dependencies.get(fruits).stream().m<caret>ax((o1, o2) -> weights.get(o1).compareTo(weights.get(o2)));
|
|
}
|
|
}
|