Hi,

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:

   people.sort(Comparators.comparing(Person::getName))
   Comparator<Person> byLastFirst
       = Comparators.comparing(Person::getLastName)
                   .compose(Comparators.comparing(Person::getFirstName))

Please review and comment on the webrev[1].

[1] http://cr.openjdk.java.net/~henryjen/webrevs/8001667.0/

Cheers,
Henry

Reply via email to