Decimal arithmetic
Copyright (c) IBM Corporation, 2000. All rights reserved. ©
11 Jan 2000
[previous | contents | next]

Constructors

These constructors are used to set the initial values of a MathContext object. If any parameter to a constructor has a value that is not in the permitted range for the corresponding shared property then an IllegalArgumentException is thrown; the properties of a MathContext object are guaranteed to have valid values.

MathContext(int)

Constructs a MathContext object which has its digits property set to the value of the first parameter, its form property set to SCIENTIFIC, its lostDigits property set to false, and its roundingMode property set to ROUND_HALF_UP.

MathContext(int, int)

Constructs a MathContext object which has its digits property set to the value of the first parameter, its form property set to the value of the second parameter, its lostDigits property set to false, and its roundingMode property set to ROUND_HALF_UP.

MathContext(int, int, boolean)

Constructs a MathContext object which has its digits property set to the value of the first parameter, its form property set to the value of the second parameter, its lostDigits property set to the value of the third parameter, and its roundingMode property set to ROUND_HALF_UP.

MathContext(int, int, boolean, int)

Constructs a MathContext object which has its digits property set to the value of the first parameter, its form property set to the value of the second parameter, its lostDigits property set to the value of the third parameter, and its roundingMode property set to the value of the fourth parameter.


[previous | contents | next]