Class TypeConverters.DurationConverter

java.lang.Object
org.apache.logging.log4j.core.config.plugins.convert.TypeConverters.DurationConverter
All Implemented Interfaces:
TypeConverter<Duration>
Enclosing class:
TypeConverters

@Plugin(name="Duration", category="TypeConverter") public static class TypeConverters.DurationConverter extends Object implements TypeConverter<Duration>
Converts a String into a Duration.
Since:
2.5
  • Constructor Details

    • DurationConverter

      public DurationConverter()
  • Method Details

    • convert

      public Duration convert(String s)
      Description copied from interface: TypeConverter
      Converts a String to a given type.
      Specified by:
      convert in interface TypeConverter<Duration>
      Parameters:
      s - the String to convert. Cannot be null.
      Returns:
      the converted object.