orEmpty method

  1. @useResult
KtList<T> orEmpty()

Returns this KtList if it's not null and the empty list otherwise.

Implementation

@useResult
KtList<T> orEmpty() => this ?? KtList<T>.empty();