mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
StreamToLoop: fixed comparator parentheses wrapping; ParenthesesUtils changes reverted (unnecessary)
This commit is contained in:
+2
-2
@@ -3,11 +3,11 @@
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
private static Optional<String> max(Map<String, List<String>> dependencies, String fruits, Map<String, String> weights) {
|
||||
private static Optional<String> max(Map<String, List<String>> dependencies, String fruits, Map<String, Integer> weights) {
|
||||
boolean seen = false;
|
||||
String best = null;
|
||||
for (String s : dependencies.get(fruits)) {
|
||||
if (!seen || weights.get(s).compareTo(weights.get(best)) > 0) {
|
||||
if (!seen || weights.get(s) - weights.get(best) > 0) {
|
||||
seen = true;
|
||||
best = s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user