Pakket | mx.formatters |
Klasse | public class NumberBase |
Overerving | NumberBase Object |
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Verwante API-elementen
Eigenschap | Gedefinieerd door | ||
---|---|---|---|
constructor : Object
Verwijzing naar het klasseobject of de constructorfunctie van een bepaalde objectinstantie. | 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 |
Methode | Gedefinieerd door | ||
---|---|---|---|
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 | ||
Geeft aan of voor een object een opgegeven eigenschap is gedefinieerd. | Object | ||
Geeft aan of een instantie van de klasse Object zich in de prototypeketen van het object bevindt dat als parameter is opgegeven. | Object | ||
Extracts a number from a formatted String. | NumberBase | ||
Geeft aan of de opgegeven eigenschap bestaat en kan worden opgesomd. | Object | ||
Stelt de beschikbaarheid van een dynamische eigenschap voor lusbewerkingen in. | Object | ||
Geeft de tekenreeksweergave van dit object weer, geformatteerd volgens de locatiespecifieke conventies. | Object | ||
Retourneert een tekenreeksrepresentatie van het opgegeven object. | Object | ||
Retourneert de primitieve waarde van het opgegeven object. | Object |
decimalSeparatorFrom | eigenschap |
public var decimalSeparatorFrom:String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Decimal separator character to use when parsing an input String.
De standaardwaarde is ".".
decimalSeparatorTo | eigenschap |
public var decimalSeparatorTo:String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Decimal separator character to use when outputting formatted decimal numbers.
De standaardwaarde is ".".
isValid | eigenschap |
public var isValid:Boolean = false
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
If true
, the format succeeded,
otherwise it is false
.
thousandsSeparatorFrom | eigenschap |
public var thousandsSeparatorFrom:String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Character to use as the thousands separator in the input String.
De standaardwaarde is ",".
thousandsSeparatorTo | eigenschap |
public var thousandsSeparatorTo:String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Character to use as the thousands separator in the output String.
De standaardwaarde is ",".
NumberBase | () | Constructor |
public function NumberBase(decimalSeparatorFrom:String = ".", thousandsSeparatorFrom:String = ",", decimalSeparatorTo:String = ".", thousandsSeparatorTo:String = ",")
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Constructor.
ParametersdecimalSeparatorFrom: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 | () | methode |
public function expandExponents(value:String):String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Formats a number in exponent notation, into a number in decimal notation.
Parameters
value:String — String to process in exponent notation.
|
String — Formatted number.
|
formatDecimal | () | methode |
public function formatDecimal(value:String):String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Formats a number by replacing the default decimal separator, ".",
with the decimal separator specified by decimalSeparatorTo
.
Parameters
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 | () | methode |
public function formatNegative(value:String, useSign:Boolean):String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Formats a negative number with either a minus sign (-) or parentheses ().
Parameters
value:String — Value to be formatted.
| |
useSign:Boolean — If true , use a minus sign (-).
If false , use parentheses ().
|
String — Formatted number.
|
formatPrecision | () | methode |
public function formatPrecision(value:String, precision:int):String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Formats a number by setting its decimal precision by using
the decimalSeparatorTo
property as the decimal separator.
Parameters
value:String — Value to be formatted.
| |
precision:int — Number of decimal points to use.
|
String — Formatted number.
|
formatRounding | () | methode |
public function formatRounding(value:String, roundType:String):String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Formats a number by rounding it. The possible rounding types are defined by mx.formatters.NumberBaseRoundType.
Parameters
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.
|
Verwante API-elementen
formatRoundingWithPrecision | () | methode |
public function formatRoundingWithPrecision(value:String, roundType:String, precision:int):String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | 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.
Parameters
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.
|
Verwante API-elementen
formatThousands | () | methode |
public function formatThousands(value:String):String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | 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.
Parameters
value:String — Value to be formatted.
|
String — Formatted number.
|
parseNumberString | () | methode |
public function parseNumberString(str:String):String
Taalversie: | ActionScript 3.0 |
Productversie: | Flex 3 |
Runtimeversies: | 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.
Parameters
str:String — String to parse for the numeric value.
|
String — Value, which can be a decimal.
|
Wed Jun 13 2018, 11:42 AM Z