Class DateTimeFunctionFactory.DateTimeFunctionImpl

java.lang.Object
com.ibm.icu.message2.DateTimeFunctionFactory.DateTimeFunctionImpl
All Implemented Interfaces:
Function
Enclosing class:
DateTimeFunctionFactory

private static class DateTimeFunctionFactory.DateTimeFunctionImpl extends Object implements Function
  • Field Details

    • icuFormatter

      private final DateFormat icuFormatter
    • locale

      private final Locale locale
    • reportErrors

      private final boolean reportErrors
  • Constructor Details

    • DateTimeFunctionImpl

      private DateTimeFunctionImpl(Locale locale, DateFormat df, boolean reportErrors)
  • Method Details

    • format

      public FormattedPlaceholder format(Object toFormat, Map<String,Object> variableOptions)
      A method that takes the object to format and returns the i18n-aware formatted placeholder.
      Specified by:
      format in interface Function
      Parameters:
      toFormat - the object to format.
      variableOptions - options that are not know at build time.
      Returns:
      the formatted placeholder.
    • formatToString

      public String formatToString(Object toFormat, Map<String,Object> variableOptions)
      A method that takes the object to format and returns the i18n-aware string representation.
      Specified by:
      formatToString in interface Function
      Parameters:
      toFormat - the object to format.
      variableOptions - options that are not know at build time.
      Returns:
      the formatted string.