kotlin.collections.elementAtOrNull

elementAtOrNull

fun <T> Iterable<T>.elementAtOrNull(index: Int): T?

Returns an element at the given index or null if the index is out of bounds of this collection.

inline fun <T> List<T>.elementAtOrNull(index: Int): T?

Returns an element at the given index or null if the index is out of bounds of this list.

inline fun <T> Array<out T>.elementAtOrNull(index: Int): T?
inline fun ByteArray.elementAtOrNull(index: Int): Byte?
inline fun ShortArray.elementAtOrNull(index: Int): Short?
inline fun IntArray.elementAtOrNull(index: Int): Int?
inline fun LongArray.elementAtOrNull(index: Int): Long?
inline fun FloatArray.elementAtOrNull(index: Int): Float?
inline fun DoubleArray.elementAtOrNull(index: Int): Double?
inline fun BooleanArray.elementAtOrNull(index: Int): Boolean?
inline fun CharArray.elementAtOrNull(index: Int): Char?

Returns an element at the given index or null if the index is out of bounds of this array.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/element-at-or-null.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部