public class AmountUtil
extends Object
- Author:
- Luna@win10
-
-
Constructor Summary
Constructors
-
Method Summary
将分为单位的转换为元并返回金额格式的字符串 (除100)
将元为单位的转换为分 替换小数点,支持以逗号区分的金额
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
CURRENCY_FEN_REGEX
public static final String CURRENCY_FEN_REGEX
金额为分的格式
- See Also:
-
-
Constructor Details
-
AmountUtil
public AmountUtil()
-
Method Details
-
changeF2Y
将分为单位的转换为元并返回金额格式的字符串 (除100)
- Parameters:
amount
- 分
- Returns:
- Throws:
Exception
-
changeF2Y
将分为单位的转换为元 (除100)
- Parameters:
amount
- 分
- Returns:
- Throws:
Exception
-
changeY2F
将元为单位的转换为分 (乘100)
- Parameters:
amount
- 元
- Returns:
-
changeY2F
将元为单位的转换为分 替换小数点,支持以逗号区分的金额
- Parameters:
amount
- 元
- Returns: