optional

inline fun <T> Config.optional(default: T, prefix: String = "", name: String? = null, description: String = ""): OptionalConfigProperty<T>

Returns a property that can read/set associated value for specified optional item.

Return

a property that can read/set associated value for specified optional item

Parameters

default

default value returned before associating this item with specified value

prefix

prefix for the config item

name

item name without prefix

description

description for this item

inline fun <T> Spec.optional(default: T, name: String? = null, description: String = ""): OptionalProperty<T>

Specify an optional item in this config spec.

Return

a property of an optional item with prefix of this config spec

Parameters

default

default value returned before associating this item with specified value

name

item name without prefix

description

description for this item