Class SecondsConverter

All Implemented Interfaces:
Converter<String,Duration>, StringConverter<Duration>, TwoWayConverter<String,Duration>, Broadcaster, Listener, Repeater, Transceiver, Receiver, Transmitter, NamedObject, StringMapper<Duration>

public class SecondsConverter extends BaseStringConverter<Duration>
Converts seconds to and from Duration
Author:
jonathanl (shibo)
  • Constructor Details

    • SecondsConverter

      public SecondsConverter(Listener listener)
  • Method Details

    • onToValue

      protected Duration onToValue(String value)
      Description copied from class: BaseStringConverter
      Implemented by subclass to convert the given string to a value. The subclass implementation will never be called in cases where value is null or empty, so it need not check for either case.
      Overrides:
      onToValue in class BaseStringConverter<Duration>
      Parameters:
      value - The (guaranteed non-null, non-empty) value to convert
      Returns:
      The converted object