Here you can find the source of toLocalizedInteger(long value)
Parameter | Description |
---|---|
value | the number to convert to a numeric String. |
public static String toLocalizedInteger(long value)
//package com.java2s; /*/* www.java 2 s . com*/ * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ import java.text.NumberFormat; public class Main { /** * Localizable Number Format constant for the current default locale * set at init time. */ private static NumberFormat NUMBER_FORMAT0; /** * This static method converts the passed in number * into a localizable representation of an integer, with * digit grouping using locale dependant separators. * * @param value the number to convert to a numeric String. * * @return a localized String representing the integer value */ public static String toLocalizedInteger(long value) { return NUMBER_FORMAT0.format(value); } }