Java Number Format NumberFormat(double str, int max, int min)

Here you can find the source of NumberFormat(double str, int max, int min)

Description

Number Format

License

Apache License

Declaration

public static String NumberFormat(double str, int max, int min) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.NumberFormat;

public class Main {

    public static String NumberFormat(double str, int max, int min) {
        NumberFormat nf = NumberFormat.getInstance();
        nf.setMaximumFractionDigits(max);
        nf.setMinimumFractionDigits(min);
        return nf.format(str);
    }/*from   w w w.j  a v a  2 s  . c om*/
}

Related

  1. formatRowKey(final long number, final int digits, byte[] dest)
  2. formatSafetyNumber(String digits)
  3. formatSheetNumber100(final int sheetNumber)
  4. formatSmallerNumber(String prefix, String suffix, long amnt, boolean useDecimals)
  5. formatTo2Digit(int number)
  6. numberFormat(double value, String format)
  7. numberFormat(int fractionDigits, Locale locale)
  8. numberFormat(int i)
  9. numberFormat(int num)