MathContext


MathContext java.math

Java 5.0 serializable

This simple class represents a precision (number of significant digits) and a RoundingMode to be used in BigDecimal arithmetic. The constants are predefined MathContext objects that can be used to select unlimited precision arithmetic or to select specific operating modes that match decimal floating-point modes defined by the IEEE 754R standard.

Figure 11-3. java.math.MathContext

 public final class  MathContext  implements Serializable {  // Public Constructors  public  MathContext  (int  setPrecision  );        public  MathContext  (String  val  );        public  MathContext  (int  setPrecision  , RoundingMode  setRoundingMode  );  // Public Constants  public static final MathContext  DECIMAL128  ;        public static final MathContext  DECIMAL32  ;        public static final MathContext  DECIMAL64  ;        public static final MathContext  UNLIMITED  ;  // Public Instance Methods  public int  getPrecision  ( );        public RoundingMode  getRoundingMode  ( );  // Public Methods Overriding Object  public boolean  equals  (Object  x  );        public int  hashCode  ( );        public String  toString  ( );   } 

Passed To

Too many methods to list.



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net