Package org.springframework.format
Interface Parser<T>
- Type Parameters:
T- the type of object this Parser produces
- All Known Subinterfaces:
Formatter<T>
- All Known Implementing Classes:
AbstractNumberFormatter,CurrencyFormatter,CurrencyStyleFormatter,CurrencyUnitFormatter,DateFormatter,DateTimeParser,InstantFormatter,LocalDateParser,LocalDateTimeParser,LocalTimeParser,MonetaryAmountFormatter,NumberFormatter,NumberStyleFormatter,PercentFormatter,PercentStyleFormatter,TemporalAccessorParser
public interface Parser<T>
Parses text strings to produce instances of T.- Since:
- 3.0
- Author:
- Keith Donald
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tparse(String text, Locale locale)Parse a text String to produce a T.
Method Detail
parse
T parse(String text, Locale locale) throws ParseException
Parse a text String to produce a T.- Parameters:
text- the text stringlocale- the current user locale- Returns:
- an instance of T
- Throws:
ParseException- when a parse exception occurs in a java.text parsing libraryIllegalArgumentException- when a parse exception occurs