Double

baja. Double

new Double()

Description:
  • Represents a baja:Double in BajaScript.

    Augments Number to be a Baja Double. ECMAScript only has one numeric
    type for Doubles, Floats, Longs and Integers. Therefore, this type
    naturally maps to baja:Double.

Source:

Extends

Members

(static) DEFAULT :Number

Description:
  • Default Number instance.

Source:

Default Number instance.

Type:
  • Number

Methods

decodeFromString(str) → {Number}

Description:
  • Decode a Number from a String.

Source:
Parameters:
Name Type Description
str String

an encoded Number.

Returns:
Type
Number

encodeToString() → {String}

Description:
  • Encode the Number (itself) to a String.

Source:
Returns:
Type
String

equals(obj) → {Boolean}

Description:
  • Equality test.

Source:
Parameters:
Name Type Description
obj
Returns:
Type
Boolean

equivalent(obj) → {Boolean}

Description:
  • Equivalence test.

    Used to compare if two objects have equivalent state, but might not want to
    return true for equals since it it has implied semantics for many
    operations. The default implementation returns the result of
    equals().

Source:
Parameters:
Name Type Description
obj
Returns:
Type
Boolean

getAgents(isopt, batchopt) → {Promise}

Description:
  • Returns a promise that resolves to the agent list for this BDouble.

Source:
Since:
  • Niagara 4.15
See:
Parameters:
Name Type Attributes Description
is Array.<String> <optional>

An optional array of filters to add to the
agent query.

batch baja.comm.Batch <optional>

An optional object used to batch network
calls together.

Returns:

A promise that will resolve with the Agent Info.

Type
Promise

getDataTypeSymbol() → {String}

Description:
  • Return the data type symbol.

    Used for encoding this data type (primarily for facets).

Source:
Returns:
Type
String

getIcon() → {baja.Icon}

Description:
  • Return the Object's Icon.

Source:
Returns:
Type
baja.Icon

getNumber() → {Number}

Description:
  • Return the Number (itself).

Source:
Returns:
Type
Number

getNumeric() → {Number}

Description:
  • Returns the Number (itself).

Source:
Returns:
Type
Number

make(num) → {Number}

Description:
  • Make a Number.

Source:
Parameters:
Name Type Description
num Number

the number value.

Returns:
Type
Number

newCopy() → {Number}

Description:
  • New Copy.

Source:
Returns:
Type
Number

toString(cxopt) → {String|Promise.<String>}

Description:
  • Return the String representation of the Double (itself).

Source:
Parameters:
Name Type Attributes Description
cx baja.Facets | Object <optional>

used to specify formatting facets. The
argument can also be an Object Literal.

Properties
Name Type Attributes Description
forceSign Boolean <optional>

specifying 'true' will concatenate a '+'
to the beginning of the number if positive.

precision Number <optional>

the number of decimal places to show in
the return string. Specifying '0' will also remove the decimal. If a context
is provided without precision, this value will default to 2. If no context
is provided, there will be no precision applied.

showSeparators Boolean <optional>

include separators.

units baja.Unit <optional>

the baja Unit to apply to the return
string.

unitConversion baja.Enum | Number | String <optional>

the
baja:UnitConversion enum, an ordinal, or tag. If omitted, the
user-configured baja.getUnitConversion() will be used.

zeroPad Number <optional>

the minimum number of the whole-number
digits to be displayed, filling in zeroes when necessary.

trimTrailingZeros boolean <optional>

set to true if trailing zeros
should not be included in the string. If the only digits after the decimal
point are zeros, the decimal point will be removed as well.

Returns:

returns a Promise if a cx is passed in.

Type
String | Promise.<String>

(static) getFacetsFromINumeric(numeric) → {baja.Facets}

Description:
  • Return facets from an INumeric

Source:
Parameters:
Name Type Description
numeric baja.Value
Returns:
Type
baja.Facets

(static) getNumberFromINumeric() → {Number}

Description:
  • Return a Number from a BINumeric.

Source:
Returns:
Type
Number

(static) make(num) → {Number}

Description:
  • Make a Number.

Source:
Parameters:
Name Type Description
num Number

the number value.

Returns:
Type
Number