Class: NumberConverterFactory

Oracle® JavaScript Extension Toolkit (JET)
5.0.0

E90577-01

QuickNav

NumberConverterFactory

Version:
  • 5.0.0
Since:
  • 0.6
Module:
  • ojvalidation-number
A factory implementation to create the built-in number converter of type oj.IntlNumberConverter.
Example

create an instance of the jet datetime converter using the options provided

var ncf = oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_NUMBER); 
var salaryOptions = {currency: "EUR" , pattern: "¤#,##0.00;(¤#,##0.00)"};
var salaryConverter = ncf.createConverter(salaryOptions);

Methods

createConverter(options) → {oj.IntlNumberConverter}

Creates an immutable (jet) number converter instance.
Parameters:
Name Type Argument Description
options Object <optional>
an object literal used to provide optional information to initialize the jet number converter with. For details on what to pass for options, refer to oj.IntlNumberConverter
Returns:
Type
oj.IntlNumberConverter