public class CurrencyStyleFormatter extends AbstractNumberFormatter
NumberFormat.getCurrencyInstance(Locale)SE へのデリゲート。精度を失わないように BigDecimal 解析を構成します。指定された RoundingModeSE を解析された値に適用できます。
AbstractNumberFormatter.setLenient(boolean), setRoundingMode(java.math.RoundingMode)| コンストラクターと説明 |
|---|
CurrencyStyleFormatter() |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected NumberFormatSE | getNumberFormat(LocaleSE locale) 指定されたロケールの具体的な NumberFormat を取得します。 |
BigDecimalSE | parse(StringSE text, LocaleSE locale) テキスト文字列を解析して T を生成します。 |
void | setCurrency(CurrencySE currency) 通貨がわかっている場合は指定します。 |
void | setFractionDigits(int fractionDigits) 小数桁数を指定します。 |
void | setPattern(StringSE pattern) 数値のフォーマットに使用するパターンを指定します。 |
void | setRoundingMode(RoundingModeSE roundingMode)10 進解析に使用する丸めモードを指定します。 |
print, setLenientcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic void setFractionDigits(int fractionDigits)
public void setRoundingMode(RoundingModeSE roundingMode)
RoundingMode.UNNECESSARYSE です。public void setCurrency(CurrencySE currency)
public void setPattern(StringSE pattern)
public BigDecimalSE parse(StringSE text, LocaleSE locale) throws ParseExceptionSE
ParserParser<NumberSE> の parse AbstractNumberFormatter の parse text - テキスト文字列 locale - 現在のユーザーロケール ParseExceptionSE - java.text 解析ライブラリで解析例外が発生したとき protected NumberFormatSE getNumberFormat(LocaleSE locale)
AbstractNumberFormatterAbstractNumberFormatter の getNumberFormat locale - 現在のロケール null)