Class fever.data.formatter.NumberFormatter

Description

NumberFormatter class formats a valid number adjusting the decimal rounding, precision and the thousands separator character.

Field Index

decimalSeparator, precision, rounding, thousandsSeparator, useThousandsSeparator

Inherited from Formatter

Method Index

new NumberFormatter()
format()

Inherited from Formatter

Constructor Detail

NumberFormatter

public function NumberFormatter()

Constructs new NumberFormatter instance.

Field Detail

decimalSeparator

public decimalSeparator:String
Decimal separator character to use when outputting formatted decimal numbers.

precision

public precision:Number
Number of decimal places to include in the output String.

rounding

public rounding:String
Specifies how to round the number.

thousandsSeparator

public thousandsSeparator:String
Character to use as the thousands separator in the output String.

useThousandsSeparator

public useThousandsSeparator:Boolean
If true, split the number into thousands increments by using a separator character.

Method Detail

format

public function format(value:Number):String

Formats and returns passed-in value.

Return

Formatted String

Overrides

format() in fever.data.formatter.Formatter