Question

sealed interface Question

A question to a DecisionModel. Its kind decides the kind of Answer.

Inheritors

Types

Link copied to clipboard
data class Choice(val instructions: String, val options: Map<String, String?>) : Question

Pick one of options. The answer is an Answer.Choice.

Link copied to clipboard
data class Score(val instructions: String, val levels: List<String>) : Question

Rate the state on a scale. The answer is an Answer.Score.

Link copied to clipboard
data class YesNo(val instructions: String, val yes: String? = null, val no: String? = null) : Question

Answer yes or no. The answer is an Answer.YesNo.

Properties

Link copied to clipboard
abstract val instructions: String

What the model should decide.