Comparators.comparing(Mapper<R, T>) <was> Re: Heads up: Mapper<T, R> -> Mapper<R, T>
Henry Jen
henry.jen at oracle.com
Wed Nov 7 07:34:32 PST 2012
Uh, you are right, it's indeed the return type.
Cheers,
Henry
On Nov 7, 2012, at 1:58 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> 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