Package kieker.tools.settings.converters
Class DateConverter
java.lang.Object
com.beust.jcommander.converters.BaseConverter<java.lang.Long>
kieker.tools.settings.converters.DateConverter
- All Implemented Interfaces:
com.beust.jcommander.IStringConverter<java.lang.Long>
public class DateConverter
extends com.beust.jcommander.converters.BaseConverter<java.lang.Long>
Converts parameter string representing a date value to timestamp.
- Since:
- 1.15
- Author:
- Reiner Jung
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DATE_FORMAT_PATTERN
The format pattern which is used to print the date.static java.lang.String
HUMAN_READABLE_DATE_FORMAT
Date format pattern used for information. -
Constructor Summary
Constructors Constructor Description DateConverter(java.lang.String optionName)
Create a date converter. -
Method Summary
Modifier and Type Method Description java.lang.Long
convert(java.lang.String value)
protected java.lang.String
getErrorString(java.lang.String value, java.lang.String to)
-
Field Details
-
DATE_FORMAT_PATTERN
public static final java.lang.String DATE_FORMAT_PATTERNThe format pattern which is used to print the date.- See Also:
- Constant Field Values
-
HUMAN_READABLE_DATE_FORMAT
public static final java.lang.String HUMAN_READABLE_DATE_FORMATDate format pattern used for information.
-
-
Constructor Details
-
DateConverter
public DateConverter(java.lang.String optionName)Create a date converter.- Parameters:
optionName
- option name
-
-
Method Details
-
convert
public java.lang.Long convert(java.lang.String value) -
getErrorString
protected java.lang.String getErrorString(java.lang.String value, java.lang.String to)- Overrides:
getErrorString
in classcom.beust.jcommander.converters.BaseConverter<java.lang.Long>
-