- java.lang.Object
-
- io.github.mmm.base.temporal.InstantParser
-
- All Implemented Interfaces:
FromStringParser<Instant>
public final class InstantParser extends Object implements FromStringParser<Instant>
FromStringParser
forInstant
values.- Since:
- 1.0.0
- See Also:
parse(String)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InstantParser
get()
Instant
parse(String instant)
Parses the givenString
to the type handled by this parser but efficiently returnsnull
if the syntax does not match.
-
-
-
Method Detail
-
parse
public Instant parse(String instant)
Description copied from interface:FromStringParser
Parses the givenString
to the type handled by this parser but efficiently returnsnull
if the syntax does not match. This allows to detect the format without wasting much performance.- Specified by:
parse
in interfaceFromStringParser<Instant>
- Parameters:
instant
- theString
to parse. May or may not be in the format expected for the type of this parser.- Returns:
- the given
String
parsed to the type handled by this parser ornull
if the syntax does not match.
-
get
public static InstantParser get()
- Returns:
- the singleton instance of this
FromStringParser
forInstant
.
-
-