utils
Members
(static) OPENHAB_JS_VERSION :string
openHAB JavaScript library version
Type:
- string
Methods
(static) dumpObject(obj, dumpPropsopt)
- Description:
Outputs all members and properties of an object and whether it is a JS or a Java Object to the log.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
obj |
* | object |
||
dumpProps |
boolean |
<optional> |
false
|
whether properties also should be dumped |
(static) javaListToJsArray(list) → {Array}
Parameters:
Name | Type | Description |
---|---|---|
list |
JavaList |
Returns:
JavaScript Array
- Type
- Array
(static) javaMapToJsMap(map) → {Map:.<any:, any:>}
Parameters:
Name | Type | Description |
---|---|---|
map |
JavaMap |
Returns:
JavaScript Map
(static) javaMapToJsObj(map) → {object}
Parameters:
Name | Type | Description |
---|---|---|
map |
JavaMap |
Returns:
JavaScript Object
- Type
- object
(static) javaSetToJsArray(set) → {Array}
Parameters:
Name | Type | Description |
---|---|---|
set |
JavaSet |
Returns:
JavaScript Array
- Type
- Array
(static) javaSetToJsSet(set) → {Set}
Parameters:
Name | Type | Description |
---|---|---|
set |
JavaSet | Java Set (https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html) |
Returns:
JavaScript Set Object (https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Set)
- Type
- Set
(static) jsArrayToJavaList(arr) → {JavaList}
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array | JavaScript Array |
Returns:
- Type
- JavaList
(static) jsArrayToJavaSet(arr) → {JavaSet}
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array |
Returns:
Java Set
- Type
- JavaSet
(static) jsSetToJavaSet(set) → {JavaSet}
Parameters:
Name | Type | Description |
---|---|---|
set |
Set | JavaScript Set |
Returns:
Java Set
- Type
- JavaSet
(static) randomUUID() → {string}
Returns:
random UUID
- Type
- string