public abstract class AbstractNumberFormatter extends ObjectSE implements Formatter<NumberSE>
getNumberFormat(java.util.Locale)
テンプレートメソッドを提供します。コンストラクターと説明 |
---|
AbstractNumberFormatter() |
修飾子と型 | メソッドと説明 |
---|---|
protected abstract NumberFormatSE | getNumberFormat(LocaleSE locale) 指定されたロケールの具体的な NumberFormat を取得します。 |
NumberSE | parse(StringSE text, LocaleSE locale) テキスト文字列を解析して T を生成します。 |
StringSE | print(NumberSE number, LocaleSE locale) 型 T のオブジェクトを表示用に出力します。 |
void | setLenient(boolean lenient) 解析を緩やかにするかどうかを指定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setLenient(boolean lenient)
緩やかな解析では、パーサーは形式に正確に一致しない入力を許可する場合があります。厳密な解析では、入力は形式と正確に一致する必要があります。
public StringSE print(NumberSE number, LocaleSE locale)
Printer
public NumberSE parse(StringSE text, LocaleSE locale) throws ParseExceptionSE
Parser
Parser<NumberSE>
の parse
text
- テキスト文字列 locale
- 現在のユーザーロケール ParseExceptionSE
- java.text 解析ライブラリで解析例外が発生したとき protected abstract NumberFormatSE getNumberFormat(LocaleSE locale)
locale
- 現在のロケール null
)