orElse

abstract fun orElse(value: T): Provider<T>(source)

Returns a Provider whose value is the value of this provider, if present, otherwise the given default value.

Since

5.6

Parameters

value

The default value to use when this provider has no value.


abstract fun orElse(provider: Provider<out T>): Provider<T>(source)

Returns a Provider whose value is the value of this provider, if present, otherwise uses the value from the given provider, if present.

Since

5.6

Parameters

provider

The provider whose value should be used when this provider has no value.