classorg.draftcode.argot
ParsedValues
The typed result of a successful parse, keyed by each parameter's canonical name.
Functions
flag
fun flag(name: String): Boolean
Returns the state of the flag name (its default if it was never supplied).
list
fun <T> list(name: String): List<T>
Returns the accumulated list bound to a multiple parameter name (empty if absent).
value
fun <T> value(name: String): T
Returns the value bound to name, cast to T. For required or defaulted parameters, where a value is always present.
Throws
ParsedValues.kt IllegalArgumentExceptionif no parameter named name was part of the parse.
valueOrNull
fun <T> valueOrNull(name: String): T?
Returns the value bound to name cast to T, or null if it was absent.