javax.money.MonetaryAmount values,
delegating to javax.money.format.MonetaryAmountFormat#format
and javax.money.format.MonetaryAmountFormat#parse .
getMonetaryAmountFormat
| Modifier and Type | Field and Description |
|---|---|
| private String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MonetaryAmountFormatter(String
the format name, to be resolved by the JSR-354
provider at runtime formatName)Create a new MonetaryAmountFormatter for the given format name. |
| Modifier and Type | Method and Description |
|---|---|
| protected MonetaryAmountFormat | Returns: the MonetaryAmountFormat (nevernull)the current locale locale)Obtain a MonetaryAmountFormat for the given locale. |
| public MonetaryAmount | parse(String
the text string text, Locale the current user locale locale)Implements org. |
| public String | print(MonetaryAmount
the instance to print object, Locale the current user locale locale)Implements org. |
| public void | setFormatName(String formatName)
Specify the format name, to be resolved by the JSR-354 provider at runtime. |
| formatName | back to summary |
|---|---|
| private String formatName
| |
| MonetaryAmountFormatter | back to summary |
|---|---|
| public MonetaryAmountFormatter() Create a locale-driven MonetaryAmountFormatter. | |
| MonetaryAmountFormatter | back to summary |
|---|---|
| public MonetaryAmountFormatter(String formatName) Create a new MonetaryAmountFormatter for the given format name.
| |
| getMonetaryAmountFormat | back to summary |
|---|---|
| protected MonetaryAmountFormat getMonetaryAmountFormat(Locale locale) Obtain a MonetaryAmountFormat for the given locale. The default implementation simply calls
| |
| parse | back to summary |
|---|---|
| public MonetaryAmount parse(String text, Locale locale) Implements org. Doc from org. Parse a text String to produce a T.
| |
| back to summary | |
|---|---|
| public String print(MonetaryAmount object, Locale locale) Implements org. Doc from org. Print the object of type T for display.
| |
| setFormatName | back to summary |
|---|---|
| public void setFormatName(String formatName) Specify the format name, to be resolved by the JSR-354 provider at runtime. Default is none, obtaining a | |