aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/main/kotlin/CollectionExtensions.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin/CollectionExtensions.kt')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/CollectionExtensions.kt16
1 files changed, 0 insertions, 16 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/CollectionExtensions.kt b/plugins/kotlin-as-java/src/main/kotlin/CollectionExtensions.kt
deleted file mode 100644
index 3eab0aeb..00000000
--- a/plugins/kotlin-as-java/src/main/kotlin/CollectionExtensions.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
- */
-
-package org.jetbrains.dokka.kotlinAsJava
-
-// TODO [beresnev] remove this copy-paste and use the same method from stdlib instead after updating to 1.5
-internal inline fun <T, R : Any> Iterable<T>.firstNotNullOfOrNull(transform: (T) -> R?): R? {
- for (element in this) {
- val result = transform(element)
- if (result != null) {
- return result
- }
- }
- return null
-}