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,CurrencyStyleFormatter,CurrencyUnitFormatter,DateFormatter,InstantFormatter,MonetaryAmountFormatter,NumberStyleFormatter,PercentStyleFormatter,TemporalAccessorParser
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Parses text strings to produce instances of T.
- Since:
- 3.0
- Author:
- Keith Donald
-
Method Summary
-
Method Details
-
parse
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
-