Datasync Value
Represents a tree-like value stored by the Webcom datasync service within its real-time database.
This class provides methods to easily convert it to native primitive or composite types (Boolean, String, Number, Map, List) or business objects (kotlinx.serialization.Serializable-annotated classes or POJO classes).
Properties
Indicates whether this value has been acknowledged by the Webcom back end (true
) or not (false
).
Gets this value as a composite List of TreeLikeData values.
Gets this value as a composite Map of TreeLikeData values.
Gets the list of all child nodes (without their keys) of this value.
Functions
Shortcut to the TreeLikeData.asA method.
Shortcut to the TreeLikeData.asListOf method.
Shortcut to the TreeLikeData.asMapOf method.
Gets the child node of this value (interpreted as a node representing a list) at a given index in the list.
Gets the child node of this value at a given key.
Gets the child node of this value (interpreted as a node representing a list) at a given index in the list.
Gets the child node of this value at a given key.
Convenient shortcut to convertToListOf, which returns null
in case of failure.
Convenient shortcut to convertToMapOf, which returns null
in case of failure.
Converts this DatasyncValue to a given T type.
Converts this DatasyncValue to a List of a given T type.
Converts this DatasyncValue to a Map of a given T type.
Attempt to convert this value using the given convert function and return the converted value if it succeeds or null
if it fails.