code: public static <T> Comparator<T> reverseOrder(Comparator<T> cmp) {
          if (cmp == null)
              return reverseOrder();
  
          if (cmp instanceof ReverseComparator2)
              return ((ReverseComparator2<T>)cmp).cmp;
  
          return new ReverseComparator2<>(cmp);
      }
docs: Returns a comparator that imposes the reverse ordering of the specified
  comparator.  If the specified comparator is {@code null}, this method is
  equivalent to {@link #reverseOrder()} (in other words, it returns a
  comparator that imposes the reverse of the <em>natural ordering</em> on
  a collection of objects that implement the Comparable interface).
  
  <p>The returned comparator is serializable (assuming the specified
  comparator is also serializable or {@code null}).
  
  @param <T> the class of the objects compared by the comparator
  @param cmp a comparator who's ordering is to be reversed by the returned
  comparator or {@code null}
  @return A comparator that imposes the reverse ordering of the
  specified comparator.
  @since 1.5