Data Tree
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Get a subset of data starting with a given branchName
Get a branch of this DataTree with a given branchName. The difference from similar method for DataSet is that internal logic is more simple and the return value is a DataTree
Link copied to clipboard
Link copied to clipboard
inline fun <R : Any> DataSet<*>.filterByType(noinline predicate: (name: Name, meta: Meta) -> Boolean = { _, _ -> true }): DataSet<R>
Select a single datum of the appropriate type
fun <R : Any> DataSet<*>.filterByType(type: KType, predicate: (name: Name, meta: Meta) -> Boolean = { _, _ -> true }): DataSource<R>
Select all data matching given type and filters. Does not modify paths
Link copied to clipboard
inline fun <T : Any, R : Any> DataSet<T>.foldToData(initial: R, coroutineContext: CoroutineContext = EmptyCoroutineContext, meta: Meta = Meta.EMPTY, crossinline block: suspend (result: R, data: NamedValueWithMeta<T>) -> R): Data<R>
Link copied to clipboard
Link copied to clipboard
Get a DataTreeItem with given name or null if the item does not exist
Link copied to clipboard
Link copied to clipboard
inline fun <T : Any, R : Any> DataSet<T>.reduceToData(coroutineContext: CoroutineContext = EmptyCoroutineContext, meta: Meta = Meta.EMPTY, crossinline transformation: suspend (Iterable<NamedValueWithMeta<T>>) -> R): Data<R>
Link copied to clipboard
A Sequence of all children including nodes
Link copied to clipboard