commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [math] StatUtils and varargs
Date Sun, 24 Nov 2013 07:22:12 GMT
On 11/23/13, 10:45 PM, Gary Gregory wrote:
> Hi All:
>
> When I use APIs like StatUtils.mean() I have to write:
>
> StatUtils.mean(new double[]{ var1, var2, var2});
>
> instead of:
>
> StatUtils.mean(var1, var2, var2);
>
> Are there any objections to changing the API sigs from foo(double[] values)
> to foo(double... values) ?

Yes.  I am -0 for adding new methods that take varargs;  -1 for
removing the double[] versions.

Phil
>
> This would not be possible for APIs like mean(double, int, int) but it's a
> start at least.
>
>
> Gary


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message