public static <T extends Comparable<? super T>> Comparator<T> naturalOrder ()

Returns a comparator that compares Comparable objects in natural order.

The returned comparator is serializable and throws NullPointerException when comparing null.

<T>    the Comparable type of element to be compared

Returns:  a comparator that imposes the natural ordering on Comparable objects.

See also:

Since:  1.8