@SuppressWarnings({"unchecked"})
public static <T> Comparator<T> reverseOrder (Comparator<T> cmp)

Returns a comparator that imposes the reverse ordering of the specified comparator. If the specified comparator is null, this method is equivalent to reverseOrder() (in other words, it returns a comparator that imposes the reverse of the natural ordering on a collection of objects that implement the Comparable interface).

The returned comparator is serializable (assuming the specified comparator is also serializable or null).

Parameters:
<T>    the class of the objects compared by the comparator
cmp    a comparator who's ordering is to be reversed by the returned comparator or null

Returns:  A comparator that imposes the reverse ordering of the specified comparator.

Since:  1.5