NumberDataAdapter

Module: TSUI.Data
Extends: DataAdapter
Implements: None
Exported: Yes

Associated source files:

Description

Number Data Adapter converts a raw input string to a number or vice-versa.

Public Methods

I2O(input: string): number
Converts raw data to JavaScript object data.Note: This implementation does not check for a valid number with the exception that it does handle NaN, null and undefined.Note: This implementation uses parseFloat.
  • input: string - The raw string data.
  • Returns: number - The (float) number data or null or undefined or NaN.
O2I(output: number): string
Converts JavaScript object data to raw data.Note: This implementation does handle NaN, null and undefined.Note: This implementation uses .toString() with radix: 10
  • output: number -
  • Returns: string - The raw string data.


Last edited Aug 29, 2013 at 10:11 PM by EdwardNutting, version 2

Comments

No comments yet.