> On 1 Jun 2019, at 20:59, Karl Heinz Marbaise <khmarba...@gmx.de> wrote:
>
> Hi,
>
> created an appropriate branch[1] with a first implementation to check If
> this is going into the right direction if not please let me know…
>
I do not see why the private count variable is an object Long and not a
primitive long.
Why the explicit BigDecimalConsumer interface? Why not Consumer<BigDecimal>?
Use the JDK standard Consumer interface and you get the default methods added
for ‘free’ and do not add a redundant interface to the codebase.
In the combine and accept methods you check both min and max for null. But only
one null check is required as both are set together (i.e. when count is 0 they
should be null, otherwise they will not be).
Following DoubleSummaryStatistics, perhaps min and max should return the
appropriate opposite infinity bounds when count is zero, i.e.
Min = Double.POSITIVE_INFINITY
Max = Double.NEGATIVE_INFINITY
Regards,
Alex
> Kind regards
> Karl Heinz Marbaise
>
> [1]:
> https://github.com/apache/commons-statistics/commit/4e65221a692dbf8346d2ac9ca9958a6e879b4da5
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org