Class IntervalConverter

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

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

    • IntervalConverter

      public IntervalConverter()
  • Method Details

    • convertFrom

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

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