Class Numeric


  • public final class Numeric
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String doubleToString​(double dValue, int fracDigits, boolean bTruncate)
      Format a double as a string
      static java.lang.String doubleToStringUsingBigDecimal​(double dValue, int fracDigits, boolean bTruncate)
      Format a double as a string using BigDecimal
      static double stringToDouble​(java.lang.String str, boolean bAllowNaN)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • doubleToStringUsingBigDecimal

        public static java.lang.String doubleToStringUsingBigDecimal​(double dValue,
                                                                     int fracDigits,
                                                                     boolean bTruncate)
        Format a double as a string using BigDecimal
        Parameters:
        dValue - - the double value
        fracDigits - - the number of fractional digits to render
        Returns:
        the formatted string
      • doubleToString

        public static java.lang.String doubleToString​(double dValue,
                                                      int fracDigits,
                                                      boolean bTruncate)
        Format a double as a string
        Parameters:
        dValue - - the double value
        fracDigits - - the number of fractional digits to render
        Returns:
        the formatted string
      • stringToDouble

        public static double stringToDouble​(java.lang.String str,
                                            boolean bAllowNaN)