@Component class QuantityFormatter extends Object implements org.springframework.format.Formatter<Quantity>
Formatter to print and parse Quantity instances. Uses a
NumberStyleFormatter for parsing of the amount.NumberStyleFormatter| Constructor and Description |
|---|
QuantityFormatter() |
| Modifier and Type | Method and Description |
|---|---|
Quantity |
parse(String text,
Locale locale) |
String |
print(Quantity object,
Locale locale) |
public String print(Quantity object, Locale locale)
print in interface org.springframework.format.Printer<Quantity>public Quantity parse(String text, Locale locale) throws ParseException
parse in interface org.springframework.format.Parser<Quantity>ParseExceptionCopyright © 2018 Pivotal Software, Inc.. All rights reserved.