hg: lambda/lambda/jdk: Convert extension methods to implmentation in the interfaces.

Remi Forax forax at univ-mlv.fr
Sat Dec 17 01:07:13 PST 2011


If T is inferred you're right but if you specified T because the compiler is not able to infer it then you will have trouble.

Rémi


Colin Decker <cgdecker at gmail.com> wrote:

>Why? The Predicate and Mapper are both ? super T, so making the Iterable ?
>extends T gains you nothing.
>
>-- 
>Colin
>
>
>On Fri, Dec 16, 2011 at 8:01 PM, Rémi Forax <forax at univ-mlv.fr> wrote:
>
>> On 12/17/2011 01:27 AM, mike.duigou at oracle.com wrote:
>> > Changeset: 09a69a0111ba
>> > Author:    mduigou
>> > Date:      2011-12-16 16:26 -0800
>> > URL:       http://hg.openjdk.java.net/lambda/lambda/jdk/rev/09a69a0111ba
>> >
>> > Convert extension methods to implmentation in the interfaces.
>> >
>> > ! src/share/classes/java/lang/Iterable.java
>> > ! src/share/classes/java/util/Collection.java
>> > ! src/share/classes/java/util/Comparator.java
>> > ! src/share/classes/java/util/Iterables.java
>> > ! src/share/classes/java/util/Iterator.java
>> > ! src/share/classes/java/util/List.java
>> > ! src/share/classes/java/util/ParallelIterable.java
>> > ! src/share/classes/java/util/functions/Block.java
>> > ! src/share/classes/java/util/functions/Mapper.java
>> > ! src/share/classes/java/util/functions/Predicate.java
>> > ! test/java/lang/Iterables/LambdasTests.java
>> > ! test/java/util/Iterators/LambdasTests.java
>> >
>> >
>>
>> Hi Mike,
>> filterMap and filterMapReduce should take an Iterable<? extends T>.
>>
>> cheers,
>> Rémi
>>
>>
>>
>


More information about the lambda-dev mailing list