Top Description Constructors Methods
org.springframework.format.datetime.standard

pack-priv Class YearMonthFormatter

extends Object
implements Formatter<YearMonth>
Class Inheritance
All Implemented Interfaces
org.springframework.format.Formatter, org.springframework.format.Parser, org.springframework.format.Printer
Imports
java.text.ParseException, java.time.YearMonth, java.util.Locale, org.springframework.format.Formatter

Formatter implementation for a JSR-310 YearMonth, following JSR-310's parsing rules for a YearMonth.
Author
Juergen Hoeller
Since
4.2.4
See Also
YearMonth#parse

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public YearMonth
parse(String
the text string
text
,
Locale
the current user locale
locale
)

Implements org.springframework.format.Parser.parse.

Parse a text String to produce a T.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

YearMonthFormatterback to summary
pack-priv YearMonthFormatter()

Method Detail

parseback to summary
public YearMonth parse(String text, Locale locale) throws ParseException

Implements org.springframework.format.Parser.parse.

Doc from org.springframework.format.Parser.parse.

Parse a text String to produce a T.

Parameters
text:String

the text string

locale:Locale

the current user locale

Returns:YearMonth

an instance of T

Annotations
@Override
Exceptions
ParseException:
when a parse exception occurs in a java.text parsing library