SentierValues¶
sealed interface SentierValues
Combines multiple SentierValue instances.
This interface behaves as an immutable typed map, similarly to kotlin.coroutines.CoroutineContext.
If the same value is added multiple times, only the last value is kept.
Example¶
See also¶
with: Operator to combine multipleSentierValueinstances.
Inheritors¶
Types¶
Empty¶
object Empty : SentierValues
The empty SentierValues instance.
Functions¶
fold¶
Combines all the values into a single value.
This is useful to convert the data out of this data structure.
get¶
abstract operator fun <T> get(value: SentierValue<T>): T?
Queries this value to see if it is present.
If it is present, its computed value is returned.
If it is not present, null is returned.
with¶
inline fun <T> SentierValues.with(spec: SentierValue<T>, value: () -> T): SentierValues