Java Fraction Format formatNormalDouble(double value)

Here you can find the source of formatNormalDouble(double value)

Description

format Normal Double

License

Open Source License

Declaration

public static String formatNormalDouble(double value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.DecimalFormat;

public class Main {
    public static String formatNormalDouble(double value) {

        String formattedDouble = formatDouble(value, "0.000");

        return formattedDouble;
    }//  w  ww  .ja v  a 2  s  . c  om

    public static String formatDouble(double value, String format) {

        if (format == null) {
            return null;
        }

        DecimalFormat formatter = new DecimalFormat(format);

        String formattedValue = formatter.format(value);

        return formattedValue;
    }
}

Related

  1. formatIntRate(double rateInt)
  2. formatKnots(double v)
  3. formatManeyPattern(String pattern, Double amount)
  4. formatMetricsDecimal(double value)
  5. formatNoGrouping(double value)
  6. formatNum(double d)
  7. formatNum(double num, int numfracdigits)
  8. formatNum(float value)
  9. formatNumber(double decimal)