Comparators.comparing(Mapper<R, T>) <was> Re: Heads up: Mapper<T, R> -> Mapper<R, T>

Paul Sandoz paul.sandoz at oracle.com
Wed Nov 7 01:58:10 PST 2012


On Nov 7, 2012, at 2:11 AM, Henry Jen <henry.jen at oracle.com> wrote:
> 
>> all methods that declares a type parameter used as first parameter of a 
>> functional type should also be declared first.
> 
> For example, <T, R> Comparators.comparing(Mapper<R, T>) should be changed.
> 

You mean this one:

    public static <T, U extends Comparable<? super U>> Comparator<T> comparing(Mapper<? extends U, ? super T> mapper) {

I did not forget this :-) I deliberately left that as is because T is used as a parameter of the return type.

Paul.


More information about the lambda-dev mailing list