getOrElse

open fun getOrElse(other: V): V

Returns the value of the reference if it is not null, otherwise returns the given value.

Return

the value of the reference if it is not null, otherwise the given value

Parameters

other

the value to return if the reference is null