类 LocalTimeParser
- java.lang.Object
- org.springframework.format.datetime.joda.LocalTimeParser
public final class LocalTimeParser extends Object implements Parser<LocalTime>
Parses JodaLocalTime
instances using aDateTimeFormatter
.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
构造器概要
构造器 构造器 说明 LocalTimeParser(DateTimeFormatter formatter)
Create a new DateTimeParser.
构造器详细资料
LocalTimeParser
public LocalTimeParser(DateTimeFormatter formatter)
Create a new DateTimeParser.- 参数:
formatter
- the Joda DateTimeFormatter instance
方法详细资料
parse
public LocalTime parse(String text, Locale locale) throws ParseException
从接口复制的说明:Parser
Parse a text String to produce a T.- 指定者:
parse
在接口中Parser<LocalTime>
- 参数:
text
- the text stringlocale
- the current user locale- 返回:
- an instance of T
- 抛出:
ParseException
- when a parse exception occurs in a java.text parsing library