Package com.beust.jcommander.converters
Class InstantConverter
java.lang.Object
com.beust.jcommander.converters.BaseConverter<Instant>
com.beust.jcommander.converters.JavaTimeConverter<Instant>
com.beust.jcommander.converters.InstantConverter
- All Implemented Interfaces:
IStringConverter<Instant>
Converter to
Instant
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Instant
parse
(String value, DateTimeFormatter formatter) Parse the value using the specified formatter.protected Set
<DateTimeFormatter> Supported formats for this type, e.g.Methods inherited from class com.beust.jcommander.converters.JavaTimeConverter
convert
Methods inherited from class com.beust.jcommander.converters.BaseConverter
getErrorString, getOptionName
-
Constructor Details
-
InstantConverter
-
-
Method Details
-
supportedFormats
Description copied from class:JavaTimeConverter
Supported formats for this type, e.g.HH:mm:ss
- Specified by:
supportedFormats
in classJavaTimeConverter<Instant>
- Returns:
- a set of supported formats
-
parse
Description copied from class:JavaTimeConverter
Parse the value using the specified formatter.- Specified by:
parse
in classJavaTimeConverter<Instant>
- Parameters:
value
- value to parseformatter
- formatter specifying supported format- Returns:
- parsed value
-