admin
2021-05-28 5965c01b38a2e83cecd7616daa11185fc2499303
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.tejia.lijin.app.ui.goldtask.scrollText;
 
import java.math.RoundingMode;
import java.text.DecimalFormat;
 
public class Utils {
    /**
     * 格式化
     */
    private static DecimalFormat dfs = null;
 
    public static DecimalFormat format(String pattern) {
        if (dfs == null) {
            dfs = new DecimalFormat();
        }
        dfs.setRoundingMode(RoundingMode.FLOOR);
        dfs.applyPattern(pattern);
        return dfs;
    }
}