 |
- java.lang.Object
-
- org.springframework.format.number.money.CurrencyUnitFormatter
-
- All Implemented Interfaces:
- Formatter<javax.money.CurrencyUnit>, Parser<javax.money.CurrencyUnit>, Printer<javax.money.CurrencyUnit>
public class CurrencyUnitFormatter
extends java.lang.Object
implements Formatter<javax.money.CurrencyUnit>
Formatter for JSR-354 CurrencyUnit values,
from and to currency code Strings.
- Since:
- 4.2
- Author:
- Juergen Hoeller
-
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type |
Method and Description |
javax.money.CurrencyUnit |
parse(java.lang.String text,
java.util.Locale locale)
Parse a text String to produce a T.
|
java.lang.String |
print(javax.money.CurrencyUnit object,
java.util.Locale locale)
Print the object of type T for display.
|
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
print
public java.lang.String print(javax.money.CurrencyUnit object,
java.util.Locale locale)
Description copied from interface: Printer
Print the object of type T for display.
- Specified by:
print in interface Printer<javax.money.CurrencyUnit>
- Parameters:
object - the instance to print
locale - the current user locale
- Returns:
- the printed text string
-
parse
public javax.money.CurrencyUnit parse(java.lang.String text,
java.util.Locale locale)
Description copied from interface: Parser
Parse a text String to produce a T.
- Specified by:
parse in interface Parser<javax.money.CurrencyUnit>
- Parameters:
text - the text string
locale - the current user locale
- Returns:
- an instance of T
|
|