mapOrAsyncForNullable
Return the result of transformer with using input as an argument for it if input is not null
.
Otherwise, return defaultValue.
Basically, this operation is a combination map()
and unwrapOr()
.
U
must not beNullable<*>
.- If the result of transformer is
null
, this throw anError
. - If the result of defaultValue is
null
, this throw anError
.
- If the result of transformer is
- If you'd like to accept
Nullable<*>
asU
, use a combinationandThen()
andor()
.