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 |
Comparable
objects.
Comparable
Diagram: Comparator