Skip to content

ParsedValues

The typed result of a successful parse, keyed by each parameter's canonical name.

ParsedValues.kt

Functions

flag

fun flag(name: String): Boolean

Returns the state of the flag name (its default if it was never supplied).

ParsedValues.kt

list

fun <T> list(name: String): List<T>

Returns the accumulated list bound to a multiple parameter name (empty if absent).

ParsedValues.kt

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.

ThrowsIllegalArgumentException

if no parameter named name was part of the parse.

ParsedValues.kt

valueOrNull

fun <T> valueOrNull(name: String): T?

Returns the value bound to name cast to T, or null if it was absent.

ParsedValues.kt

Released under the Apache License 2.0.