public class NumberUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT
默认format 2位小数
|
static Map<String,DecimalFormat> |
formatCache |
static String |
INTEGER
取整
|
| 构造器和说明 |
|---|
NumberUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
defaultFormat(Number num)
默认格式化 ***
|
static String |
format(Number num,
String format)
格式化
|
static DecimalFormat |
getFormart(String format)
获取format对象
|
public static final Map<String,DecimalFormat> formatCache
public static DecimalFormat getFormart(String format)
format - public static String format(Number num, String format)
num - format - Copyright © 2018. All rights reserved.