Class AutomationNumberTool

  • All Implemented Interfaces:
    Serializable

    public class AutomationNumberTool
    extends org.apache.velocity.tools.generic.NumberTool
    Extension of the standard NumberTool that allows the locale specification as string.
    Since:
    7.3
    Author:
    Marco Meschieri - LogicalDOC
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.apache.velocity.tools.generic.FormatConfig

        DEFAULT_FORMAT, FORMAT_KEY
      • Fields inherited from class org.apache.velocity.tools.generic.LocaleConfig

        DEFAULT_LOCALE
      • Fields inherited from class org.apache.velocity.tools.generic.SafeConfig

        LOCK_CONFIG_KEY, LOGGER_NAME_KEY, SAFE_MODE_KEY, USE_CLASS_LOGGER_KEY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String format​(String format, Object obj, String locale)
      Formats a number using the specified format
      • Methods inherited from class org.apache.velocity.tools.generic.NumberTool

        currency, format, format, format, getNumberFormat, integer, number, percent, toNumber, toNumber, toNumber
      • Methods inherited from class org.apache.velocity.tools.generic.FormatConfig

        getFormat
      • Methods inherited from class org.apache.velocity.tools.generic.LocaleConfig

        getLocale, toLocale
      • Methods inherited from class org.apache.velocity.tools.generic.SafeConfig

        configure, isConfigLocked, isSafeMode
    • Constructor Detail

      • AutomationNumberTool

        public AutomationNumberTool()
    • Method Detail

      • format

        public String format​(String format,
                             Object obj,
                             String locale)
        Formats a number using the specified format
        Parameters:
        format - the format to use
        obj - the number to format
        locale - a locale specification
        Returns:
        the formatted number