Package com.logicaldoc.core.automation

# Class AutomationNumberTool

java.lang.Object
org.apache.velocity.tools.generic.SafeConfig
org.apache.velocity.tools.generic.LocaleConfig
org.apache.velocity.tools.generic.FormatConfig
org.apache.velocity.tools.generic.NumberTool
com.logicaldoc.core.automation.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`

## Constructor Summary

Constructors
Constructor
Description
`AutomationNumberTool()`

## Method Summary

Modifier and Type
Method
Description
`String`
`format(String format, Object obj, String locale)`
Formats a number using the specified format
`Long`
`toLong(String str)`
Converts a string into a Long

### 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`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AutomationNumberTool

public AutomationNumberTool()

## Method Details

### 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

### toLong

public Long toLong(String str)
Converts a string into a Long

Parameters:
  `str` - The string to convert
Returns:
  The converted value