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)  

    Methods inherited from class com.beust.jcommander.converters.BaseConverter

    getOptionName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 class com.beust.jcommander.converters.BaseConverter<java.lang.Long>