getOrElse

@SinceKotools(project = Project.Types, version = "1.3")
inline fun <E> NotEmptyCollection<E>.getOrElse(index: Int, defaultValue: (Int) -> E): E
@SinceKotools(project = Project.Types, version = "1.3")
inline fun <E> NotEmptyCollection<E>.getOrElse(index: PositiveInt, defaultValue: (PositiveInt) -> 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.