Returns the string representation of this
MathContext
.
The
String
returned represents the settings of the
MathContext
object as two space-delimited words
(separated by a single space character,
'\u0020',
and with no leading or trailing white space), as follows:
-
The string
"precision="
, immediately followed
by the value of the precision setting as a numeric string as if
generated by the Integer.toString
method.
-
The string
"roundingMode="
, immediately
followed by the value of the roundingMode
setting as a
word. This word will be the same as the name of the
corresponding public constant in the RoundingMode
enum.
For example:
precision=9 roundingMode=HALF_UP
Additional words may be appended to the result of
toString
in the future if more properties are added to
this class.
Returns:
a {@code String} representing the context settings