OrElseGet<T> extension
Extension on T? to add an orElseGet method.
Methods
-
orElseGet(T supplier())
→ T
-
Available on T?,
provided by the OrElseGet extension
Returns the value if it is not null, otherwise returns the value supplied
by the supplier function.