StreamToLoop: fixed comparator parentheses wrapping; ParenthesesUtils changes reverted (unnecessary)

This commit is contained in:
Tagir Valeev
2016-12-20 09:48:30 +07:00
parent 7b1f7c495a
commit 7ebe6f583d
4 changed files with 8 additions and 13 deletions
@@ -3,7 +3,7 @@
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)));
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));
}
}