On Sat, 10 Jul 2021 at 09:19, Gilles Sadowski <gillese...@gmail.com> wrote:
> Le ven. 9 juil. 2021 à 16:21, Alex Herbert <alex.d.herb...@gmail.com> a > écrit : > > > > [...] > > SortInPlace > > > > The latter was recently ported from Commons Math. For that class there > is a > > warning about using varargs for the signature of BiConsumer<double[], > > double[][]>. It is using accept(double[], double[]...). I am not sure if > > this is a real problem or not. The varargs is not allowed in the > BiConsumer > > signature. So perhaps it should be removed from the implementation of the > > method. > > The varargs API is handy for sorting related arrays without the user having > to create a temporary array of arrays. > > I don't also know whether the warning (I didn't notice it) is a problem, > but > if it is, I'd rather remove the "implements" clause than the method. [I > don't > have a real-life example for using the interface.] > +1 to removing the interface. The vargargs has more benefit than the interface declaration. Alex