Class DateStringConverter

java.lang.Object
de.muehlencord.shared.configuration.converter.DateStringConverter
All Implemented Interfaces:
StringConverter<Date>

public class DateStringConverter extends Object implements StringConverter<Date>
Author:
Joern Muehlencord (joern@muehlencord.de)
  • Constructor Details

    • DateStringConverter

      public DateStringConverter()
  • Method Details

    • toString

      public String toString(Date d)
      Converter a parameter object to a string representation
      Specified by:
      toString in interface StringConverter<Date>
      Parameters:
      d - the parameter value to convert
      Returns:
      the parameter value as string
    • fromString

      public Date fromString(String s) throws ConverterException
      Converter a string to date
      Specified by:
      fromString in interface StringConverter<Date>
      Parameters:
      s - string representation of a parameter value to convert to an object
      Returns:
      the parameter value as date
      Throws:
      ConverterException - if the conversion fails