src/share/classes/java/util/Collections.java
Print this page
rev 6620 : 8001667: Comparator combinators and extension methods
Reviewed-by: mduigou, briangoetz
Contributed-by: henry.jen@oracle.com
*** 3757,3767 ****
public int compare(Comparable<Object> c1, Comparable<Object> c2) {
return c2.compareTo(c1);
}
! private Object readResolve() { return reverseOrder(); }
}
/**
* Returns a comparator that imposes the reverse ordering of the specified
* comparator. If the specified comparator is {@code null}, this method is
--- 3757,3767 ----
public int compare(Comparable<Object> c1, Comparable<Object> c2) {
return c2.compareTo(c1);
}
! private Object readResolve() { return Collections.reverseOrder(); }
}
/**
* Returns a comparator that imposes the reverse ordering of the specified
* comparator. If the specified comparator is {@code null}, this method is