Request for Review: CR#8001667: Comparators class and Comparator extension method

Henry Jen henry.jen at
Wed Nov 14 04:09:23 UTC 2012


This is a change set regarding Comparator already in lambda repo, it
depends on the CR#8001634, particularly the Function SAMs.

It implements proposed extension methods on Comparator
(reverse and compose) as well as static combinator methods in
Comparators for things like turning a T -> {Comparable,int,long,double}
into a Comparator<T>.

This allows things like:

   Comparator<Person> byLastFirst
       = Comparators.comparing(Person::getLastName)

Please review and comment on the webrev[1].



More information about the core-libs-dev mailing list