I would prefer to conform toString() to the current formats accepted by parse() .
The toString() method separates the real and imaginary components by commas. Separating numbers by commas strikes me as dangerous given that the input expressions to be parsed may also contain commas within the numbers. The format "x + yi" strikes me as satisfyingly unambiguous. Eric On Tue, Apr 24, 2018 at 3:38 PM, Gilles <gil...@harfang.homelinux.org> wrote: > Hi. > > The contract indicates:[1] > --- > There must be a static factory method capable of creating an > instance from the formal string representation. [...] > --- > > Currently "toString" and "parse" do not match. > > Regards, > Gilles > > [1] http://blog.joda.org/2014/03/valjos-value-java-objects.html > >