On 11/13/13 2:31 AM, Gilles wrote: > On Tue, 12 Nov 2013 09:44:13 -0800, Phil Steitz wrote: >> The implementation of this method has been replaced by the >> MathArrays extracted version, but deprecating and subsequently >> removing it from AbstractUnivariateStatistic eliminates the ability >> of subclasses to override and implement their own input array >> validation methods. I am -0 on removing that flexibility. Anyone >> mind if I remove the deprecation on this method? > > What is a use-case for implementing the contract of those methods in > more than one way?
The use case is not a different implementation of the default array validation provided by the MathArrays version in AbstractUnivariateStatistic, but to allow different contracts. For example, some implementations may be able to handle NaN weights or to allow the length parameter to extend beyond the end of the array (interpreting that to mean just all elements beyond the start point). Also, the fact that the test method is *always* called before evaluation makes it a convenient extension point for other kinds of parameter validation. In any of these cases, the contract itself would be changed in the override. The point of leaving it in is to allow the flexibility to change the contract / behavior of the method that checks the input array for validity. Phil > > Gilles > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
