Class: CallbackReturnValue

CallbackReturnValue(valueopt)

A ValueHolder for a CallbackReturnCode.

Constructor

new CallbackReturnValue(valueopt)

Creates a new instance.
Parameters:
Name Type Attributes Default Description
value number <optional>
CallbackReturnCode.SUCCESS The value property.
Source:

Members

errorMsg

Access an optional error message when value is not SUCCESS.
Source:

errorMsg

Assign the error message.
Source:

value

Access the callbackReturnCode.
Source:

Methods

hasErrorMsg() → {boolean}

A predicate to test if an error message has been assigned.
Source:
Returns:
Return true if an error message has been assigned; otherwise return false.
Type
boolean

isError() → {boolean}

A predicate to test if the value is ERROR.
Source:
Returns:
Return true if the value is ERROR; otherwise return false.
Type
boolean

isFailure() → {boolean}

A predicate to test if the value is FAILURE.
Source:
Returns:
Return true if the value is FAILURE; otherwise return false.
Type
boolean

isSuccess() → {boolean}

A predicate to test if the value is SUCCESS.
Source:
Returns:
Return true if the value is SUCCESS; otherwise return false.
Type
boolean

valueOf() → {number}

Overrides Object.valueOf() to return the 'value' property.
Source:
Returns:
The property value.
Type
number