commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject [Math] Confusing (?) use of "getInstance()" in formatting classes
Date Tue, 26 Jul 2011 12:19:24 GMT

[This is related to issue MATH-622.]

Looking at the "CompositeFormat" and "RealVectorFormat", I notice an unusual
use of the "getInstance" method name. Unless I'm mistaken, "getInstance" is
most often used when the object stores a reference to a singleton. And in
those class, this does not seem to be the case: When I write
the output is unaffected, the default being to display 2 fraction digits),
which is not suitable for debugging.

I think that there should be a way to modify at once all outputs formatted
through "CompositeFormat", i.e. an actual singleton instance of "NumberFormat"
that is used by all "default" formatting.

Do you agree? Any caveats?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message