mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 21:30:56 +07:00
10 lines
322 B
Java
10 lines
322 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, Integer> weights) {
|
|
return dependencies.get(fruits).stream().m<caret>ax((o1, o2) -> weights.get(o1)-weights.get(o2));
|
|
}
|
|
}
|