Interface IDurationUnitFormatter

  • All Known Implementing Classes:
    RBDurationUnitFormatter
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface IDurationUnitFormatter
    Formats a single duration unit according to supplied locale and plurality flag.
    Since:
    2.0.0
    Author:
    Pascal Essiembre
    See Also:
    DurationFormatter
    • Method Detail

      • format

        String format​(DurationUnit unit,
                      Locale locale,
                      boolean plural)
        Format a duration unit
        Parameters:
        unit - duration unit
        locale - locale
        plural - true if plural
        Returns:
        formatted unit