Comparator/Comparators API change proposal

Stephen Colebourne scolebourne at
Tue Jun 4 02:10:22 PDT 2013

On 3 June 2013 22:33, Henry Jen <henry.jen at> wrote:
> 2. rename Comparator.reverseOrder() default method to reverse(), it's
> simply reverse form of the comparator.

I would recommend reversed().

reverse() implies you are changing a property of the comparator, in a
mutable style. reversed() implies that you are returning a new
comparator in an immutable style.

list.sort( comparing(Person::getLastName).reversed() );

See "past tense" in


More information about the lambda-dev mailing list