Package com.ibm.icu.text

Examples of com.ibm.icu.text.NumberFormat


    @Override
    public String formatNumber(double number, Locale locale) {
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getNumberInstance(locale);
        return nf.format(number);
    }
View Full Code Here


            return null;
        }
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getNumberInstance(locale);
        nf.setMinimumFractionDigits(minFractionDigits);
        nf.setMaximumFractionDigits(maxFractionDigits);
        return nf.format(number);
    }
View Full Code Here

    @Override
    public String formatPercent(double percent, Locale locale) {
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getPercentInstance(locale);
        return nf.format(percent);
    }
View Full Code Here

    @Override
    public String formatPercent(double percent, Locale locale, int minFractionDigits, int maxFractionDigits) {
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getPercentInstance(locale);
        nf.setMinimumFractionDigits(minFractionDigits);
        nf.setMaximumFractionDigits(maxFractionDigits);
        return nf.format(percent);
    }
View Full Code Here

            throw new ParseException("Parameter 'number' was null", 0);
        }
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getInstance(locale);
        return AuraNumberFormat.parseStrict(number, nf).intValue();
    }
View Full Code Here

            throw new ParseException("Parameter 'number' was null", 0);
        }
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getInstance(locale);
        return AuraNumberFormat.parseStrict(number, nf).longValue();
    }
View Full Code Here

            throw new ParseException("Parameter 'number' was null", 0);
        }
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getInstance(locale);
        return AuraNumberFormat.parseStrict(number, nf).floatValue();
    }
View Full Code Here

            throw new ParseException("Parameter 'number' was null", 0);
        }
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getInstance(locale);
        return AuraNumberFormat.parseStrict(number, nf).doubleValue();
    }
View Full Code Here

            throw new ParseException("Parameter 'percent' was null", 0);
        }
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getPercentInstance(locale);
        return AuraNumberFormat.parseStrict(percent, nf).doubleValue();
    }
View Full Code Here

            return null;
        }
        if (locale == null) {
            locale = Aura.getLocalizationAdapter().getAuraLocale().getNumberLocale();
        }
        NumberFormat nf = NumberFormat.getNumberInstance(locale);
        return nf.format(number);
    }
View Full Code Here

TOP

Related Classes of com.ibm.icu.text.NumberFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.