Review Request: 8004201: add reducers to primitive type wrappers (original) (raw)

David Holmes david.holmes at oracle.com
Mon Dec 3 01:50:46 UTC 2012


Hi Akhil,

Is it really necessary/desirable to flag all of these as " Suitable for conversion as a method reference to functional interfaces such as ..." ?

This style:

is at odds with the style used elsewhere for new Functional APIs, and with the style of other methods in these classes. Can we just use "first operand" and "second operand" for all of these?

Character.sum does not make sense to me. Who adds together characters? I'm not even sure min and max are worth supporting for Character.

I disagree with other suggestions to use the Math functions for float/double. I think all these methods should use the underlying primitive operator regardless of type.

Thanks, David

On 1/12/2012 4:44 AM, Akhil Arora wrote:

Hi

Requesting review for some basic functionality related to lambdas - Add min, max, sum methods to the primitive wrapper classes - Byte, Short, Integer, Long, Float, Double and Character so as to be able to use them as reducers in lambda expressions. Add and, or, xor methods to Boolean. http://cr.openjdk.java.net/~akhil/8004201.0/webrev/ http://bugs.sun.com/bugdatabase/viewbug.do?bugid=8004201 Thanks



More information about the core-libs-dev mailing list