接口 Parser<T>
- 类型参数:
T- the type of object this Parser produces
- 所有已知子接口:
Formatter<T>
- 所有已知实现类:
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.- 从以下版本开始:
- 3.0
- 作者:
- Keith Donald
方法详细资料
parse
T parse(String text, Locale locale) throws ParseException
Parse a text String to produce a T.- 参数:
text- the text stringlocale- the current user locale- 返回:
- an instance of T
- 抛出:
ParseException- when a parse exception occurs in a java.text parsing libraryIllegalArgumentException- when a parse exception occurs