Boolean

Boolean

new Boolean()

Description:
  • Represents a baja:Boolean in BajaScript.

    Augments Boolean to be a baja:Boolean.

Source:

Extends

Members

(static) DEFAULT

Description:
  • Default Boolean instance.

Source:

Default Boolean instance.

Methods

decodeFromString(str) → {Boolean}

Description:
  • Decode a Boolean from a String.

Source:
Parameters:
Name Type Description
str String

an encoded Boolean.

Returns:
Type
Boolean

encodeToString() → {String}

Description:
  • Encode the Boolean (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 {@link
    Boolean#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 BBoolean.

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

getBoolean() → {Boolean}

Description:
  • Return the Boolean (itself).

Source:
Returns:
Type
Boolean

getDataTypeSymbol() → {String}

Description:
  • Return the data type symbol.

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

Source:
Returns:
Type
String

getDisplayTag(obj) → {Promise.<String>}

Description:
  • Asynchronously get the display tag of this Enum value.

Source:
Parameters:
Name Type Description
obj Object

the Object Literal used to specify the method's
arguments.

Properties
Name Type Attributes Description
facets baja.Facets | Object <optional>

facets used to specify the true
and false text. The argument can also be an Object Literal.

Properties
Name Type Attributes Description
trueText String <optional>

a baja Format string. If Boolean
is true, function will return baja.Format(obj.facets.trueText) instead of
'true'.

falseText String <optional>

a baja Format string. If Boolean
is false, function will return baja.Format(obj.facets.falseText) instead of
'false'.

ok function <optional>

(Deprecated: use Promise) ok callback called
with String value as argument.

fail function <optional>

(Deprecated: use Promise) optional fail
callback.

Returns:
Type
Promise.<String>

getEnum() → {Boolean}

Description:
  • Return the Boolean (itself).

Source:
Returns:
Type
Boolean

getIcon() → {baja.Icon}

Description:
  • Return the Object's Icon.

Source:
Returns:
Type
baja.Icon

getOrdinal() → {Number}

Description:
  • Return the Enum ordinal.

Source:
Returns:
Type
Number

getRange() → {baja.EnumRange}

Description:
  • Return the Enum Range.

Source:
Returns:
Type
baja.EnumRange

getTag() → {String}

Description:
  • Return the String identifier of this Enum value.

Source:
Returns:
Type
String

isActive() → {Boolean}

Description:
  • Return true if this Enum value is considered to be in an active state.

Source:
Returns:
Type
Boolean

make(b) → {Boolean}

Description:
  • Make a Boolean.

Source:
Parameters:
Name Type Description
b Boolean

a JavaScript Boolean value.

Returns:
Type
Boolean

newCopy() → {Boolean}

Description:
  • New Copy.

Source:
Returns:
Type
Boolean

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

Description:
  • Returns a string representation of the Boolean (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
trueText String <optional>

a baja Format string. If Boolean is true,
function will return baja.Format(cx.trueText) instead of 'true'.

falseText String <optional>

a baja Format string. If Boolean is
false, function will return baja.Format(cx.falseText) instead of 'false'.

Returns:

returns a Promise if a cx is passed in.

Type
String | Promise.<String>

(static) getBooleanFromIBoolean(iBoolean) → {Boolean}

Description:
  • Return a Boolean from a BIBoolean.

Source:
Parameters:
Name Type Description
iBoolean baja.Value

any value type implementing BIBoolean

Returns:
Type
Boolean

(static) getFacetsFromIBoolean(boolVal) → {baja.Facets}

Description:
  • Return facets from an IBoolean

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

(static) make(b) → {Boolean}

Description:
  • Make a Boolean.

Source:
Parameters:
Name Type Description
b Boolean

a JavaScript Boolean value.

Returns:
Type
Boolean