Pacchetto | mx.formatters |
Classe | public class NumberBase |
Ereditarietà | NumberBase Object |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Elementi API correlati
Proprietà | Definito da | ||
---|---|---|---|
constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | ||
decimalSeparatorFrom : String
Decimal separator character to use
when parsing an input String. | NumberBase | ||
decimalSeparatorTo : String
Decimal separator character to use
when outputting formatted decimal numbers. | NumberBase | ||
isValid : Boolean = false
If true, the format succeeded,
otherwise it is false. | NumberBase | ||
thousandsSeparatorFrom : String
Character to use as the thousands separator
in the input String. | NumberBase | ||
thousandsSeparatorTo : String
Character to use as the thousands separator
in the output String. | NumberBase |
Metodo | Definito da | ||
---|---|---|---|
NumberBase(decimalSeparatorFrom:String = ".", thousandsSeparatorFrom:String = ",", decimalSeparatorTo:String = ".", thousandsSeparatorTo:String = ",")
Constructor. | NumberBase | ||
Formats a number in exponent notation, into
a number in decimal notation. | NumberBase | ||
Formats a number by replacing the default decimal separator, ".",
with the decimal separator specified by decimalSeparatorTo. | NumberBase | ||
Formats a negative number with either a minus sign (-)
or parentheses (). | NumberBase | ||
Formats a number by setting its decimal precision by using
the decimalSeparatorTo property as the decimal separator. | NumberBase | ||
Formats a number by rounding it. | NumberBase | ||
Formats a number by rounding it and setting the decimal precision. | NumberBase | ||
Formats a number by using
the thousandsSeparatorTo property as the thousands separator
and the decimalSeparatorTo property as the decimal separator. | NumberBase | ||
Indica se per un oggetto è definita una proprietà specifica. | Object | ||
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | ||
Extracts a number from a formatted String. | NumberBase | ||
Indica se la proprietà specificata esiste ed è enumerabile. | Object | ||
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | ||
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | ||
Restituisce la rappresentazione in formato stringa dell'oggetto specificato. | Object | ||
Restituisce il valore di base dell'oggetto specificato. | Object |
decimalSeparatorFrom | proprietà |
public var decimalSeparatorFrom:String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Decimal separator character to use when parsing an input String.
Il valore predefinito è ".".
decimalSeparatorTo | proprietà |
public var decimalSeparatorTo:String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Decimal separator character to use when outputting formatted decimal numbers.
Il valore predefinito è ".".
isValid | proprietà |
public var isValid:Boolean = false
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
If true
, the format succeeded,
otherwise it is false
.
thousandsSeparatorFrom | proprietà |
public var thousandsSeparatorFrom:String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Character to use as the thousands separator in the input String.
Il valore predefinito è ",".
thousandsSeparatorTo | proprietà |
public var thousandsSeparatorTo:String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Character to use as the thousands separator in the output String.
Il valore predefinito è ",".
NumberBase | () | Funzione di costruzione |
public function NumberBase(decimalSeparatorFrom:String = ".", thousandsSeparatorFrom:String = ",", decimalSeparatorTo:String = ".", thousandsSeparatorTo:String = ",")
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Constructor.
ParametridecimalSeparatorFrom:String (default = ". ") — Decimal separator to use
when parsing an input String.
| |
thousandsSeparatorFrom:String (default = ", ") — Character to use
as the thousands separator in the input String.
| |
decimalSeparatorTo:String (default = ". ") — Decimal separator character to use
when outputting formatted decimal numbers.
| |
thousandsSeparatorTo:String (default = ", ") — Character to use
as the thousands separator in the output String.
|
expandExponents | () | metodo |
public function expandExponents(value:String):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Formats a number in exponent notation, into a number in decimal notation.
Parametri
value:String — String to process in exponent notation.
|
String — Formatted number.
|
formatDecimal | () | metodo |
public function formatDecimal(value:String):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Formats a number by replacing the default decimal separator, ".",
with the decimal separator specified by decimalSeparatorTo
.
Parametri
value:String — The String value of the Number
(formatted American style ####.##).
|
String — String representation of the input where "." is replaced
with the decimal formatting character.
|
formatNegative | () | metodo |
public function formatNegative(value:String, useSign:Boolean):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Formats a negative number with either a minus sign (-) or parentheses ().
Parametri
value:String — Value to be formatted.
| |
useSign:Boolean — If true , use a minus sign (-).
If false , use parentheses ().
|
String — Formatted number.
|
formatPrecision | () | metodo |
public function formatPrecision(value:String, precision:int):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Formats a number by setting its decimal precision by using
the decimalSeparatorTo
property as the decimal separator.
Parametri
value:String — Value to be formatted.
| |
precision:int — Number of decimal points to use.
|
String — Formatted number.
|
formatRounding | () | metodo |
public function formatRounding(value:String, roundType:String):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Formats a number by rounding it. The possible rounding types are defined by mx.formatters.NumberBaseRoundType.
Parametri
value:String — Value to be rounded.
| |
roundType:String — The type of rounding to perform:
NumberBaseRoundType.NONE, NumberBaseRoundType.UP,
NumberBaseRoundType.DOWN, or NumberBaseRoundType.NEAREST.
|
String — Formatted number.
|
Elementi API correlati
formatRoundingWithPrecision | () | metodo |
public function formatRoundingWithPrecision(value:String, roundType:String, precision:int):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Formats a number by rounding it and setting the decimal precision. The possible rounding types are defined by mx.formatters.NumberBaseRoundType.
Parametri
value:String — Value to be rounded.
| |
roundType:String — The type of rounding to perform:
NumberBaseRoundType.NONE, NumberBaseRoundType.UP,
NumberBaseRoundType.DOWN, or NumberBaseRoundType.NEAREST.
| |
precision:int — int of decimal places to use.
|
String — Formatted number.
|
Elementi API correlati
formatThousands | () | metodo |
public function formatThousands(value:String):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Formats a number by using
the thousandsSeparatorTo
property as the thousands separator
and the decimalSeparatorTo
property as the decimal separator.
Parametri
value:String — Value to be formatted.
|
String — Formatted number.
|
parseNumberString | () | metodo |
public function parseNumberString(str:String):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Extracts a number from a formatted String. Examines the String from left to right and returns the first number sequence. Ignores thousands separators and includes the decimal and numbers trailing the decimal.
Parametri
str:String — String to parse for the numeric value.
|
String — Value, which can be a decimal.
|
Tue Jun 12 2018, 02:44 PM Z