Class ZonedDateTimeValueHandler
java.lang.Object
org.tquadrat.foundation.config.cli.CmdLineValueHandler<ZonedDateTime>
org.tquadrat.foundation.config.cli.TimeValueHandler<ZonedDateTime>
org.tquadrat.foundation.config.cli.ZonedDateTimeValueHandler
@ClassVersion(sourceVersion="$Id: ZonedDateTimeValueHandler.java 896 2021-04-05 20:25:33Z tquadrat $")
@API(status=INTERNAL,
since="0.0.1")
public final class ZonedDateTimeValueHandler
extends TimeValueHandler<ZonedDateTime>
The implementation of
TimeValueHandler
for
ZonedDateTime.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: ZonedDateTimeValueHandler.java 896 2021-04-05 20:25:33Z tquadrat $
- Since:
- 0.0.1
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.config.cli.ZonedDateTimeValueHandler"
-
Field Summary
Fields inherited from class org.tquadrat.foundation.config.cli.TimeValueHandler
MSG_InvalidDateTimeFormat, MSGKEY_InvalidDateTimeFormat, NOWFields inherited from class org.tquadrat.foundation.config.cli.CmdLineValueHandler
DEFAULT_PROPERTY_NAME, MSG_InvalidParameter, MSGKEY_InvalidParameter -
Constructor Summary
ConstructorsConstructorDescriptionZonedDateTimeValueHandler(BiConsumer<String, ZonedDateTime> valueSetter) Creates a newZonedDateTimeValueHandlerinstance.ZonedDateTimeValueHandler(CLIDefinition context, BiConsumer<String, ZonedDateTime> valueSetter) Creates a newZonedDateTimeValueHandlerinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected final Optional<TimeDateStringConverter<ZonedDateTime>> Creates a non-standard string converter that uses the provided format.protected final ZonedDateTimegetNow()Get the current time.Methods inherited from class org.tquadrat.foundation.config.cli.TimeValueHandler
getFormatter, getStringConverter, translateMethods inherited from class org.tquadrat.foundation.config.cli.CmdLineValueHandler
getCLIDefinition, getPropertyName, getValueSetter, parseCmdLine, setContext
-
Constructor Details
-
ZonedDateTimeValueHandler
public ZonedDateTimeValueHandler(CLIDefinition context, BiConsumer<String, ZonedDateTime> valueSetter) Creates a newZonedDateTimeValueHandlerinstance.- Parameters:
context- The CLI definition that provides the context for this value handler.valueSetter- TheConsumerthat places the translated value to the property.
-
ZonedDateTimeValueHandler
Creates a newZonedDateTimeValueHandlerinstance.- Parameters:
valueSetter- TheConsumerthat places the translated value to the property.
-
-
Method Details
-
createCustomStringConverter
Creates a non-standard string converter that uses the provided format.- Specified by:
createCustomStringConverterin classTimeValueHandler<ZonedDateTime>- Returns:
- An instance o
Optionalthat holds theStringConverter.
-
getNow
Get the current time.- Specified by:
getNowin classTimeValueHandler<ZonedDateTime>- Returns:
- The current time.
-
