Excerpt | ||
---|---|---|
| ||
Siddhi Inbuilt functions in wiki format |
...
coalesce
Anchor | ||||
---|---|---|---|---|
|
Syntax | < int|long|float|double|string|bool|object > coalesce (<int|long|float|double|string|bool|object> arg1, <int|long|float|double|string|bool|object> arg2,.., <int|long|float|double|string|bool|object> argN) |
---|---|
Extension Type | Function |
Description | Returns the value of the first input parameter that is not null. |
Parameters | This function accepts one or more parameters. They can belong to any one of the available types. All the specified parameters should be of the same type. |
Return Type | This will be the same as the type of the first input parameter. |
Examples |
|
...
convert
Anchor | ||||
---|---|---|---|---|
|
Syntax | < int|long|float|double|string|bool > convert (<int|long|float|double|string|bool> toBeConverted, <string> convertedTo) |
---|---|
Extension Type | Function |
Description | Converts the first input parameter according to the convertedTo parameter. |
Parameters |
|
Return Type | The return type is the same as the type specified by the convertedTo parameter. |
Examples |
|
...
instanceOfBoolean
Anchor | ||||
---|---|---|---|---|
|
Syntax | < bool > instanceOfBoolean (<int|long|float|double|string|bool|object> arg) |
---|---|
Extension Type | Function |
Description | Checks whether the parameter is an instance of Boolean or not. |
Parameters |
|
Return Type | Returns bool: true if the parameter is an instance of Boolean, or false if the parameter is not an instance of Boolean. |
Examples |
|
instanceOfDouble
Anchor | ||||
---|---|---|---|---|
|
Syntax | < bool > instanceOfDouble (<int|long|float|double|string|bool|object> arg) |
---|---|
Extension Type | Function |
Description | Checks whether the parameter is an instance of Double or not. |
Parameters |
|
Return Type | Returns bool: true if the parameter is an instance of Double, or false if the parameter is not an instance of Double. |
Examples |
|
instanceOfFloat
Anchor | ||||
---|---|---|---|---|
|
Syntax | < bool > instanceOfFloat (<int|long|float|double|string|bool|object> arg) |
---|---|
Extension Type | Function |
Description | Checks whether the parameter is an instance of Float or not. |
Parameter | The parameter to be checked. |
Return Type | Returns bool: true if the parameter is an instance of Float, or false if the parameter is not an instance of Float. |
Examples |
|
instanceOfInteger
Anchor | ||||
---|---|---|---|---|
|
Syntax | < bool > instanceOfInteger (<int|long|float|double|string|bool|object> arg) |
---|---|
Extension Type | Function |
Description | Checks whether the parameter is an instance of Integer or not. |
Parameter | The parameter to be checked. |
Return Type | Returns bool: true if the parameter is an instance of Integer, or false if the parameter is not an instance of Integer. |
Examples |
|
instanceOfLong
Anchor | ||||
---|---|---|---|---|
|
Syntax | < bool > instanceOfLong (<int|long|float|double|string|bool|object> arg) |
---|---|
Extension Type | Function |
Description | Checks whether the parameter is an instance of Long or not. |
Parameter | The parameter to be checked. |
Return Type | Returns bool: true if the parameter is an instance of Long, or false if the parameter is not an instance of Long. |
Examples |
|
instanceOfString
Anchor | ||||
---|---|---|---|---|
|
Syntax | < bool > instanceOfString (<int|long|float|double|string|bool|object> arg) |
---|---|
Extension Type | Function |
Description | Checks whether the parameter is an instance of String or not. |
Parameter | The parameter to be checked. |
Return Type | Returns bool: true if the parameter is an instance of String, or false if the parameter is not an instance of String. |
Examples |
|
UUID
Syntax | < string > UUID ( ) | |||||||
---|---|---|---|---|---|---|---|---|
Extension Type | Function | |||||||
Description | Generates a UUID (Universally Unique Identifier). | |||||||
Return Type | Returns a UUID string. | |||||||
Examples |
|
...
Syntax | <int|long|float|double> minimum(<int|long|float|double>) |
---|---|
Extension Type | Function |
Description | Returns the minimum value of the input parameters. |
Parameter | This function accepts one or more parameters. They can belong to any one of the available types. All the specified parameters should be of the same type. |
Return Type | This will be the same as the type of the first input parameter. |
Examples |
|
cast
Anchor | ||||
---|---|---|---|---|
|
Syntax | <int|long|float|double|string|bool|object> cast |
---|---|
Extension Type | Function |
Description | Converts the first parameter according to the |
Parameters |
|
Return Type | This is the same as the type of the second input parameter. |
Examples |
|
ifThenElse
Anchor | ||||
---|---|---|---|---|
|
Syntax | <bool> ifThenElse |
---|---|
Extension Type | Function |
Description | Returns the the value of the arg1 parameter if the condition parameter is set to |
Parameters |
|
Return Type | Returns |
Examples |
|
...