Abstract base class for number formatters.

2.0

Hierarchy (view full)

Implements

Methods

  • Casts this object to the specified type. Throws error on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns T1

  • Determines whether the specified object is equal to the current object.

    Parameters

    • obj: any

      The object to compare with the current object.

    Returns boolean

    true if the specified object is equal to the current object; otherwise, false.

  • Serves as the default hash function.

    Returns number

    A hash code for the current object.

  • Returns a string that represents the current object.

    Returns string

    A string that represents the current object.

  • Casts this object to the specified type. Returns null on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns null | T1

  • Determines whether the specified object instances are considered equal.

    Parameters

    • objA: any

      The first object to compare.

    • objB: any

      The second object to compare.

    Returns boolean

    true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.

Default capability

  • get CultureName(): string
  • Gets or sets the name of the culture that defines the default formatting.

    Returns string

    2.0

  • set CultureName(value): void
  • Parameters

    • value: string

    Returns void

  • get CurrencyCultureName(): string
  • Gets or sets the name of the culture that defines the currency formatting.

    Returns string

    2.0

  • set CurrencyCultureName(value): void
  • Parameters

    • value: string

    Returns void

  • get DecimalDigits(): number
  • Gets or sets the number of decimal digits. If not explicitly set, a default value is returned according to the current Spotfire.Dxp.Data.Formatters.NumberFormatter.Category: General: -1 (not applicable)Number: CultureInfo.NumberFormat.NumberDecimalDigitsCurrency: CultureInfo.NumberFormat.CurrencyDecimalDigitsPercentage: CultureInfo.NumberFormat.PercentDecimalDigitsScientific: 6 Custom: -1 (not applicable)

    Returns number

    2.0

  • set DecimalDigits(value): void
  • Parameters

    • value: number

    Returns void

  • get EmptyString(): string
  • Gets or sets the string used to indicate empty values. (FormatInvalid(error)).

    Returns string

    2.0

  • set EmptyString(value): void
  • Parameters

    • value: string

    Returns void

  • get ExactParse(): boolean
  • Gets or sets a value indicating whether the format of the string representation must match the specified format exactly or not. Default is false.

    Returns boolean

    2.0

  • set ExactParse(value): void
  • Parameters

    • value: boolean

    Returns void

  • get FormatString(): string
  • Gets or sets a format string that defines how values are formatted.

    Returns string

    2.0

  • set FormatString(value): void
  • Parameters

    • value: string

    Returns void

  • get GroupSeparatorEnabled(): boolean
  • Gets or sets a value indicating whether the group separator is enabled or not.

    Returns boolean

    2.0

  • set GroupSeparatorEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get IsLocalized(): boolean
  • Gets a value indicating whether this formatter is localized and always uses CultureInfo derived from the current running thread or not.

    Returns boolean

    2.0

  • get IsReadOnly(): boolean
  • Gets a value indicating whether the formatter is read-only or not.

    Returns boolean

    2.0

  • get NumberStyles(): NumberStyles
  • Gets or sets a NumberStyles object that defines how string representations are parsed.

    Returns NumberStyles

    2.0

  • set NumberStyles(value): void
  • Parameters

    Returns void

  • get ShortFormattingEnabled(): boolean
  • Gets or sets a value indicating whether or not short number formatting should be used.

    Returns boolean

    2.0

  • set ShortFormattingEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get UseEngineeringNotation(): boolean
  • Gets or sets a value indicating whether or not engineering notation should be used, which rounds the exponent in scientific formatting to a multiple of 3. The default value is false.

    Returns boolean

    2.0

  • set UseEngineeringNotation(value): void
  • Parameters

    • value: boolean

    Returns void

  • Returns a writable copy of this formatter.

    Returns unknown

    A new formatter copied from the original formatter

    2.0

  • Override this method to convert an object to a string value.

    Parameters

    • obj: any

      An object to convert.

    Returns string

    A string value

    2.0

  • Override this method to convert a string value to an object.

    Parameters

    • str: string | String

      A string value to convert.

    Returns unknown

    An object.

    2.0

  • Converts a string representation to an object. A return value indicates whether the conversion succeeded or failed.

    Parameters

    Returns boolean

    true if str was converted successfully; otherwise, false.

    2.0