接口 Parser<T>

类型参数:
T - the type of object this Parser produces
所有已知子接口:
Formatter<T>
所有已知实现类:
AbstractNumberFormatter, CurrencyStyleFormatter, CurrencyUnitFormatter, DateFormatter, InstantFormatter, MonetaryAmountFormatter, NumberStyleFormatter, PercentStyleFormatter, TemporalAccessorParser
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface Parser<T>
Parses text strings to produce instances of T.
从以下版本开始:
4.0
作者:
Keith Donald
  • 方法概要

    修饰符和类型
    方法
    说明
    parse(String text, Locale locale)
    Parse a text String to produce a T.
  • 方法详细资料

    • parse

      T parse(String text, Locale locale) throws ParseException
      Parse a text String to produce a T.
      参数:
      text - the text string
      locale - the current user locale
      返回:
      an instance of T
      抛出:
      ParseException - when a parse exception occurs in a java.text parsing library
      IllegalArgumentException - when a parse exception occurs