class Formatter
package feathers.formatters
implements IFormatter
extended by CurrencyFormatter, DateFormatter, NumberFormatter, PhoneFormatter, ZipCodeFormatter
The Formatter class is the base class for all data formatters.
Any subclass of Formatter must override the format()
method.
Static variables
staticdefaultInvalidFormatError:String
Error message for an invalid format string specified to the formatter.
The localeChain property of the ResourceManager is used to resolve
the default error message. If it is unable to find a value, it will
return null
. This can happen if none of the locales
specified in the localeChain are compiled into the application.
staticdefaultInvalidValueError:String
Error messages for an invalid value specified to the formatter. The
localeChain property of the ResourceManager is used to resolve the
default error message. If it is unable to find a value, it will return
null
. This can happen if none of the locales specified in
the localeChain are compiled into the application.
Constructor
Variables
error:String
Description saved by the formatter when an error occurs. For the possible values of this property, see the description of each formatter.
Subclasses must set this value in the format()
method.
Methods
format(value:Dynamic):String
Formats a value and returns a String containing the new, formatted, value. All subclasses must override this method to implement the formatter.
Parameters:
value | Value to be formatted. |
---|
Returns:
The formatted string.