Top Description Methods
org.springframework.format

public Interface Parser<T>

Known Direct Subinterfaces
org.springframework.format.Formatter
Known Direct Implementers
org.springframework.format.datetime.standard.TemporalAccessorParser
Annotations
@FunctionalInterface
Type Parameters
<T>
the type of object this Parser produces
Imports
java.text.ParseException, java.util.Locale

Parses text strings to produce instances of T.
Author
Keith Donald
Since
3.0

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

an instance of T
parse
(String
the text string
text
,
Locale
the current user locale
locale
)

Parse a text String to produce a T.

Method Detail

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

Parse a text String to produce a T.

Parameters
text:String

the text string

locale:Locale

the current user locale

Returns:T

an instance of T

Exceptions
ParseException:
when a parse exception occurs in a java.text parsing library
IllegalArgumentException:
when a parse exception occurs