Packagecom.esri.bacore
Classpublic class ValueFormat
InheritanceValueFormat Inheritance Object

The ValueFormat class provides formatting of a numerical value.

See also

ValueInfo
ValueCalculator
TMAttributesProvider
ClassificationResults


Public Properties
 PropertyDefined By
  decimals : int
The number of significant digits after the decimal point.
ValueFormat
  formatter : IValueFormatter
Formatter to be used to format the value.
ValueFormat
  formatWithUnits : Boolean
True value of this property means formatting with units.
ValueFormat
  valueType : BAValueType
The type of value to be formatted.
ValueFormat
Public Methods
 MethodDefined By
  
ValueFormat(decimals:int = -1, valueType:BAValueType = null, valueFormatter:IValueFormatter = null, formatWithUnits:Boolean = true)
Initializes a new instance of the ValueFormat class.
ValueFormat
  
formatValue(value:Number):String
Formats a value to the string representation applying properties of this format.
ValueFormat
Property Detail
decimalsproperty
decimals:int

The number of significant digits after the decimal point. Negative value means unknown number of digits.

The default value is -1.


Implementation
    public function get decimals():int
    public function set decimals(value:int):void
formatterproperty 
formatter:IValueFormatter

Formatter to be used to format the value.

The default value is an instance of the ValueFormatter class..


Implementation
    public function get formatter():IValueFormatter
    public function set formatter(value:IValueFormatter):void

See also

formatWithUnitsproperty 
formatWithUnits:Boolean

True value of this property means formatting with units. If this property value is true, the formatValueWithUnits method of value formatter is used. Otherwise, the formatValue method is used.

The default value is true.


Implementation
    public function get formatWithUnits():Boolean
    public function set formatWithUnits(value:Boolean):void
valueTypeproperty 
valueType:BAValueType

The type of value to be formatted.

The default value is BAValueType.COUNT.


Implementation
    public function get valueType():BAValueType
    public function set valueType(value:BAValueType):void
Constructor Detail
ValueFormat()Constructor
public function ValueFormat(decimals:int = -1, valueType:BAValueType = null, valueFormatter:IValueFormatter = null, formatWithUnits:Boolean = true)

Initializes a new instance of the ValueFormat class.

Parameters
decimals:int (default = -1) — The number of significant digits after the decimal point. Negative value means unknown number of digits.
 
valueType:BAValueType (default = null) — The type of value to be formatted.
 
valueFormatter:IValueFormatter (default = null) — Formatter to be used to format the value.
 
formatWithUnits:Boolean (default = true) — True value means formatting with units.
Method Detail
formatValue()method
public function formatValue(value:Number):String

Formats a value to the string representation applying properties of this format.

Parameters

value:Number — A value to be formatted.

Returns
String