...
|
...
|
@@ -13,7 +13,8 @@ import java.util.regex.Pattern; |
|
|
* Created by chunhua.zhang@yoho.cn on 2015/12/15.
|
|
|
*/
|
|
|
public class BigDecimalHelper {
|
|
|
public static final String FORMAT_TWOBITAFTERPOINT = "##0.00";
|
|
|
public static final String FORMAT_TWOBITAFTERPOINT = "##0.00",
|
|
|
FORMAT_NOPOINT = "##0";
|
|
|
|
|
|
private static Map<String,DecimalFormat> DecimalFormatCache = new HashMap<>();
|
|
|
|
...
|
...
|
@@ -95,7 +96,7 @@ public class BigDecimalHelper { |
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
System.out.println(formatNumber(new BigDecimal(111123.0011D), FORMAT_NOPOINT));
|
|
|
System.out.println(isDigitalNumber("11111"));
|
|
|
System.out.println(isDigitalNumber("1111.00"));
|
|
|
System.out.println(isDigitalNumber("1111.0"));
|
...
|
...
|
|