Java Number Format Pattern getNumberFormatter()

Here you can find the source of getNumberFormatter()

Description

get Number Formatter

License

Open Source License

Declaration

private static NumberFormat getNumberFormatter() 

Method Source Code


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

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.NumberFormat;

public class Main {
    private static NumberFormat numberFormatter;

    private static NumberFormat getNumberFormatter() {
        if (numberFormatter == null) {
            DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols();
            otherSymbols.setDecimalSeparator('.');
            numberFormatter = new DecimalFormat("0.0#######", otherSymbols);
        }//from   www. java  2  s  .  c  om
        return numberFormatter;
    }
}

Related

  1. getNumberFormat(int maximumFractionDigits)
  2. getNumberFormat(String format, Locale locale)
  3. getNumberFormat(String localeStr)
  4. getNumberFormatFromCache(Locale locale, Currency currency)
  5. getNumberFormatInstanceFor2DecimalDigits()
  6. getNumberFormatter(final String format)
  7. getNumberFraction2Format(final Locale locale)
  8. getNumberOfDays(String year, String month)
  9. getNumberStyleAsInt(String style)