getOrElse

@SinceKotoolsTypes(version = "1.3")
inline fun <E> NotEmptyCollection<E>.getOrElse(index: Int, defaultValue: (Int) -> @UnsafeVariance E): E
@SinceKotoolsTypes(version = "1.3")
inline fun <E> NotEmptyCollection<E>.getOrElse(index: PositiveInt, defaultValue: (PositiveInt) -> @UnsafeVariance E): E
@SinceKotoolsTypes(version = "1.3")
inline fun <E> NotEmptyCollection<E>.getOrElse(index: StrictlyPositiveInt, defaultValue: (StrictlyPositiveInt) -> @UnsafeVariance E): E

Returns the element at the specified index in this collection, or returns the result of calling the defaultValue function if the index is out of bounds.