@@ -1467,6 +1467,8 @@ public inline fun CharArray.firstOrNull(predicate: (Char) -> Boolean): Char? {
14671467
14681468/**
14691469 * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.
1470+ *
1471+ * @sample samples.collections.Collections.Elements.getOrElse
14701472 */
14711473@kotlin.internal.InlineOnly
14721474public inline fun <T> Array<out T>.getOrElse(index: Int, defaultValue: (Int) -> T): T {
@@ -1478,6 +1480,8 @@ public inline fun <T> Array<out T>.getOrElse(index: Int, defaultValue: (Int) ->
14781480
14791481/**
14801482 * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.
1483+ *
1484+ * @sample samples.collections.Collections.Elements.getOrElse
14811485 */
14821486@kotlin.internal.InlineOnly
14831487public inline fun ByteArray.getOrElse(index: Int, defaultValue: (Int) -> Byte): Byte {
@@ -1489,6 +1493,8 @@ public inline fun ByteArray.getOrElse(index: Int, defaultValue: (Int) -> Byte):
14891493
14901494/**
14911495 * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.
1496+ *
1497+ * @sample samples.collections.Collections.Elements.getOrElse
14921498 */
14931499@kotlin.internal.InlineOnly
14941500public inline fun ShortArray.getOrElse(index: Int, defaultValue: (Int) -> Short): Short {
@@ -1500,6 +1506,8 @@ public inline fun ShortArray.getOrElse(index: Int, defaultValue: (Int) -> Short)
15001506
15011507/**
15021508 * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.
1509+ *
1510+ * @sample samples.collections.Collections.Elements.getOrElse
15031511 */
15041512@kotlin.internal.InlineOnly
15051513public inline fun IntArray.getOrElse(index: Int, defaultValue: (Int) -> Int): Int {
@@ -1511,6 +1519,8 @@ public inline fun IntArray.getOrElse(index: Int, defaultValue: (Int) -> Int): In
15111519
15121520/**
15131521 * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.
1522+ *
1523+ * @sample samples.collections.Collections.Elements.getOrElse
15141524 */
15151525@kotlin.internal.InlineOnly
15161526public inline fun LongArray.getOrElse(index: Int, defaultValue: (Int) -> Long): Long {
@@ -1522,6 +1532,8 @@ public inline fun LongArray.getOrElse(index: Int, defaultValue: (Int) -> Long):
15221532
15231533/**
15241534 * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.
1535+ *
1536+ * @sample samples.collections.Collections.Elements.getOrElse
15251537 */
15261538@kotlin.internal.InlineOnly
15271539public inline fun FloatArray.getOrElse(index: Int, defaultValue: (Int) -> Float): Float {
@@ -1533,6 +1545,8 @@ public inline fun FloatArray.getOrElse(index: Int, defaultValue: (Int) -> Float)
15331545
15341546/**
15351547 * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.
1548+ *
1549+ * @sample samples.collections.Collections.Elements.getOrElse
15361550 */
15371551@kotlin.internal.InlineOnly
15381552public inline fun DoubleArray.getOrElse(index: Int, defaultValue: (Int) -> Double): Double {
@@ -1544,6 +1558,8 @@ public inline fun DoubleArray.getOrElse(index: Int, defaultValue: (Int) -> Doubl
15441558
15451559/**
15461560 * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.
1561+ *
1562+ * @sample samples.collections.Collections.Elements.getOrElse
15471563 */
15481564@kotlin.internal.InlineOnly
15491565public inline fun BooleanArray.getOrElse(index: Int, defaultValue: (Int) -> Boolean): Boolean {
@@ -1555,6 +1571,8 @@ public inline fun BooleanArray.getOrElse(index: Int, defaultValue: (Int) -> Bool
15551571
15561572/**
15571573 * Returns an element at the given [index] or the result of calling the [defaultValue] function if the [index] is out of bounds of this array.
1574+ *
1575+ * @sample samples.collections.Collections.Elements.getOrElse
15581576 */
15591577@kotlin.internal.InlineOnly
15601578public inline fun CharArray.getOrElse(index: Int, defaultValue: (Int) -> Char): Char {
0 commit comments