# | Line 3319 | Line 3319 | public class Collections { | |
---|---|---|
3319 | public int compare(Comparable<Object> c1, Comparable<Object> c2) { | |
3320 | return c2.compareTo(c1); | |
3321 | } | |
3322 | + | |
3323 | + | private Object readResolve() { return reverseOrder(); } |
3324 | } | |
3325 | ||
3326 | /** | |
# | Line 3337 | Line 3339 | public class Collections { | |
3339 | */ | |
3340 | public static <T> Comparator<T> reverseOrder(Comparator<T> cmp) { | |
3341 | if (cmp == null) | |
3342 | < | return new ReverseComparator(); // Unchecked warning!! |
3342 | > | return reverseOrder(); |
3343 | ||
3344 | return new ReverseComparator2<T>(cmp); | |
3345 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |