Class NumberFormatterFactory.NumberFormatterImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      NumberFormatterImpl​(java.util.Locale locale, java.util.Map<java.lang.String,​java.lang.Object> fixedOptions, java.lang.String kind)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FormattedPlaceholder format​(java.lang.Object toFormat, java.util.Map<java.lang.String,​java.lang.Object> variableOptions)
      A method that takes the object to format and returns the i18n-aware formatted placeholder.
      java.lang.String formatToString​(java.lang.Object toFormat, java.util.Map<java.lang.String,​java.lang.Object> variableOptions)
      A method that takes the object to format and returns the i18n-aware string representation.
      (package private) LocalizedNumberFormatter getIcuFormatter()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • locale

        private final java.util.Locale locale
      • fixedOptions

        private final java.util.Map<java.lang.String,​java.lang.Object> fixedOptions
      • kind

        private final java.lang.String kind
      • advanced

        final boolean advanced
    • Constructor Detail

      • NumberFormatterImpl

        NumberFormatterImpl​(java.util.Locale locale,
                            java.util.Map<java.lang.String,​java.lang.Object> fixedOptions,
                            java.lang.String kind)
    • Method Detail

      • formatToString

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

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