Request for Review (#3) : CR#8001634 : Initial set of lambda functional interfaces

Mike Duigou mike.duigou at oracle.com
Tue Nov 20 03:55:38 UTC 2012


The reason is that {Int|Double|Long}Function take an object and yield a primitive. Supplier, BinaryOperator, UnaryOperator and Block variants all operate on the primitive type (or the boxed version) and don't utilize any generic reference types. The only reference types used are the boxed versions of the primitive.

Mike

On Nov 14 2012, at 22:56 , David Holmes wrote:

> Hi Mike,
> 
> My original comment still stands regarding the wording in the Function specializations versus all the others. Why does, for example, IntFunction say "this is the {@code int}-bearing specialization for {@link Function}", yet IntBinaryOperator does not make a similar statement regarding BinaryOperator?
> 
> David
> 
> On 14/11/2012 11:19 AM, Mike Duigou wrote:
>> Hello all;
>> 
>> I apologize for the quick turnaround from the second review request [1] but I've updated the webrev again:
>> 
>> http://cr.openjdk.java.net/~mduigou/8001634/4/webrev/
>> 
>> Blame a busy Paul Sandoz who his making significant progress on the primitive specializations implementation. ;-)
>> 
>> This update includes:
>> 
>> - Block.apply renamed to Block.accept
>> - {Int|Long|Double}Block specializations added.
>> - Commented out "extends Combiner<T,T,T>" in BinaryOperator was removed for now since Combiner is out of scope for this review.
>> - The {Int|Long|Double} specializations of BinaryOperator and UnaryOperator now show commented out extends of the generic version along with commented out default methods. This change will not be part of the commit but is meant to show where the implementation will be going.
>> - The {Int|Long|Double} specializations of Supplier now extend generic Supplier, have getAs{Int|Long|Double} as their abstract method and provide a commented out default get() method to satisfy the need for a get implementation.
>> - The {Int|Long|Double} specializations of Function now extend generic Function, have applyAs{Int|Long|Double} as their abstract method and provide a commented out default apply() method to satisfy the need for an apply implementation.
>> 
>> Mike
>> 
>> [1] http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-November/012225.html




More information about the core-libs-dev mailing list