Class LocalTimeParser
- java.lang.Object
- org.springframework.format.datetime.joda.LocalTimeParser
public final class LocalTimeParser extends Object implements Parser<LocalTime>
Parses JodaLocalTimeinstances using aDateTimeFormatter.- Since:
- 4.0
- Author:
- Juergen Hoeller
Constructor Summary
Constructors Constructor Description LocalTimeParser(DateTimeFormatter formatter)Create a new DateTimeParser.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalTimeparse(String text, Locale locale)Parse a text String to produce a T.
Constructor Detail
LocalTimeParser
public LocalTimeParser(DateTimeFormatter formatter)
Create a new DateTimeParser.- Parameters:
formatter- the Joda DateTimeFormatter instance
Method Detail
parse
public LocalTime parse(String text, Locale locale) throws ParseException
Description copied from interface:ParserParse a text String to produce a T.- Specified by:
parsein interfaceParser<LocalTime>- 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 library