Class YearsConverter

java.lang.Object
com.github.joschi.jadconfig.jodatime.converters.YearsConverter
All Implemented Interfaces:
Converter<org.joda.time.Years>

public class YearsConverter extends Object implements Converter<org.joda.time.Years>
Converter for type Years
Author:
jschalanda
  • Constructor Details

    • YearsConverter

      public YearsConverter()
  • Method Details

    • convertFrom

      public org.joda.time.Years convertFrom(String value)
      Returns a Years instance representing the specified String value.
      Specified by:
      convertFrom in interface Converter<org.joda.time.Years>
      Parameters:
      value - The configuration parameter's String value
      Returns:
      A Years instance representing the configuration parameter's value
    • convertTo

      public String convertTo(org.joda.time.Years value)
      Returns a String instance representing the configuration parameter's value.
      Specified by:
      convertTo in interface Converter<org.joda.time.Years>
      Parameters:
      value - The configuration parameter's Years value
      Returns:
      A String instance representing the configuration parameter's typed value