Re: LegacyAccumulatorWrapper basically requires the Accumulator value to implement equlas() or it will fail on isZero()

2016-06-13 Thread Amit Sela
I thought so, and I agree. Still good to have this indexed here :) On Mon, Jun 13, 2016 at 10:43 PM Sean Owen wrote: > I think that's right, but that seems as expected. If you're going to > use this utility wrapper class, it can only determine if something is > zero by

Re: LegacyAccumulatorWrapper basically requires the Accumulator value to implement equlas() or it will fail on isZero()

2016-06-13 Thread Sean Owen
I think that's right, but that seems as expected. If you're going to use this utility wrapper class, it can only determine if something is zero by comparing it to your 'zero' object, and that means defining equality. I suspect it's uncommon to accumulate things that aren't primitives or standard

LegacyAccumulatorWrapper basically requires the Accumulator value to implement equlas() or it will fail on isZero()

2016-06-13 Thread Amit Sela
It seems that if you have an AccumulatorParam (or AccumulableParam) where "R" is not a primitive, it will need to implement equlas() if the implementation of the zero() creates a new instance (which I guess it will in those cases). This is where isZero applies the comparison: