| Ensure.js | |
| Functions | |
| ensureTrue | Checks if given argument is the boolean value “true”., throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureFalse | Checks if given argument is the boolean value “false”., throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureExists | Checks if given argument exists (not null, not undefined), throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureString | Checks if given argument is string, throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureNumber | Checks if given argument is number, throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureNotEmptyString | Checks if given argument is a non-empty string, throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureObject | Checks if given argument is an object (not null, not undefined), throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureArray | Checks if given argument is an array, throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureFunction | Checks if given argument is a function, throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureInstanceOf | Checks if given value is an instance of the given function, throws {Legato.Lang.IllegalArgumentException} otherwise. |
| ensureImplements | Checks if given value implements a function with the given name, throws {Legato.Lang.IllegalArgumentException} otherwise. |
ensureTrue : function( value, message )
Checks if given argument is the boolean value “true”., throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| message | {String} exception message (optional). |
ensureFalse : function( value, message )
Checks if given argument is the boolean value “false”., throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| message | {String} exception message (optional). |
ensureExists : function( value, message )
Checks if given argument exists (not null, not undefined), throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| message | {String} exception message (optional). |
ensureString : function( value, message )
Checks if given argument is string, throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| message | {String} exception message (optional). |
ensureNumber : function( value, message )
Checks if given argument is number, throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| message | {String} exception message (optional). |
ensureNotEmptyString : function( value, message )
Checks if given argument is a non-empty string, throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| message | {String} exception message (optional). |
ensureObject : function( value, message )
Checks if given argument is an object (not null, not undefined), throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| message | {String} exception message (optional). |
ensureArray : function( value, message )
Checks if given argument is an array, throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| message | {String} exception message (optional). |
ensureFunction : function( value, message )
Checks if given argument is a function, throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| message | {String} exception message (optional). |
ensureInstanceOf : function( value, f, message )
Checks if given value is an instance of the given function, throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| f | {Function} potential constructor function. |
| message | {String} exception message (optional). |
ensureImplements : function( value, functionName, message )
Checks if given value implements a function with the given name, throws {Legato.Lang.IllegalArgumentException} otherwise.
| value | value to check. |
| functionName | {String} name of the function. |
| message | {String} exception message (optional). |
Checks if given argument is the boolean value “true”., throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureTrue : function( value, message )
Checks if given argument is the boolean value “false”., throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureFalse : function( value, message )
Checks if given argument exists (not null, not undefined), throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureExists : function( value, message )
Checks if given argument is string, throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureString : function( value, message )
Checks if given argument is number, throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureNumber : function( value, message )
Checks if given argument is a non-empty string, throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureNotEmptyString : function( value, message )
Checks if given argument is an object (not null, not undefined), throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureObject : function( value, message )
Checks if given argument is an array, throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureArray : function( value, message )
Checks if given argument is a function, throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureFunction : function( value, message )
Checks if given value is an instance of the given function, throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureInstanceOf : function( value, f, message )
Checks if given value implements a function with the given name, throws {Legato.Lang.IllegalArgumentException} otherwise.
ensureImplements : function( value, functionName, message )