You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Kotlin %kotlinEapVersion% release is out! Here are some details of this EAP release:
15
15
16
-
***Kotlin compiler plugin**: [Lombok is Alpha](#lombok-is-now-alpha) and [improved JPA support in the `kotlin.plugin.jpa` plugin](#improved-jpa-support-in-the-kotlin-plugin-jpa-plugin)
16
+
***Kotlin compiler plugins**: [Lombok is Alpha](#lombok-is-now-alpha) and [improved JPA support in the `kotlin.plugin.jpa` plugin](#improved-jpa-support-in-the-kotlin-plugin-jpa-plugin)
17
17
***Kotlin/Native**: [New interoperability mode for C and Objective-C libraries](#new-interoperability-mode-for-c-or-objective-c-libraries) and [concurrent marking in the garbage collector is enabled by default](#default-concurrent-marking-in-garbage-collector)
18
18
***Gradle**: [Compatibility with Gradle 9.3.0](#compatibility-with-gradle-9-3-0) and [Kotlin/JVM compilation uses BTA by default](#kotlin-jvm-compilation-uses-build-tools-api-by-default)
19
19
***Maven**: [Simplified setup for Kotlin projects](#maven-simplified-setup-for-kotlin-projects)
@@ -93,7 +93,6 @@ To address this and other issues, the Kotlin team has been revising the interope
Report any problems to our issue tracker [YouTrack](https://kotl.in/issue).
149
148
150
-
## Standard library: New API for creating immutable copies of `Map.Entry`
151
-
<primary-labelref="experimental-opt-in"/>
152
-
153
-
Kotlin %kotlinEapVersion% introduces the `Map.Entry.copy()` extension function for creating an immutable copy of a [`Map.Entry`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/-entry/).
154
-
This function allows you to reuse entries obtained from [`Map.entries`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/entries.html) after modifying the map by copying them first.
155
-
156
-
`Map.Entry.copy()` is [Experimental](components-stability.md#stability-levels-explained). To opt in, use the `@OptIn(ExperimentalStdlibApi::class)` annotation or the compiler option `-opt-in=kotlin.ExperimentalStdlibApi`.
157
-
158
-
Here's an example of using `Map.Entry.copy()` to remove entries from a mutable map:
159
-
160
-
```kotlin
161
-
@OptIn(ExperimentalStdlibApi::class)
162
-
funmain() {
163
-
val map =mutableMapOf(1 to 1, 2 to 2, 3 to 3, 4 to 4)
164
-
165
-
val toRemove = map.entries
166
-
.filter { it.key %2==0 }
167
-
.map { it.copy() }
168
-
169
-
map.entries.removeAll(toRemove)
170
-
171
-
println("map = $map")
172
-
// map = {1=1, 3=3}
173
-
}
174
-
```
175
-
176
149
## Gradle
177
150
178
151
Kotlin %kotlinEapVersion% is compatible with new versions of Gradle and includes changes to Kotlin/JVM compilation in the Kotlin Gradle plugin.
@@ -234,3 +207,29 @@ You can also opt out of the automatic addition of Kotlin's standard library. For
234
207
```
235
208
236
209
For more information on Maven configuration in Kotlin projects, see [Configure a Maven project](maven-configure-project.md).
210
+
211
+
## Standard library: New API for creating immutable copies of `Map.Entry`
212
+
<primary-labelref="experimental-opt-in"/>
213
+
214
+
Kotlin %kotlinEapVersion% introduces the `Map.Entry.copy()` extension function for creating an immutable copy of a [`Map.Entry`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/-entry/).
215
+
This function allows you to reuse entries obtained from [`Map.entries`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/entries.html) after modifying the map by copying them first.
216
+
217
+
`Map.Entry.copy()` is [Experimental](components-stability.md#stability-levels-explained). To opt in, use the `@OptIn(ExperimentalStdlibApi::class)` annotation or the compiler option `-opt-in=kotlin.ExperimentalStdlibApi`.
218
+
219
+
Here's an example of using `Map.Entry.copy()` to remove entries from a mutable map:
220
+
221
+
```kotlin
222
+
@OptIn(ExperimentalStdlibApi::class)
223
+
funmain() {
224
+
val map =mutableMapOf(1 to 1, 2 to 2, 3 to 3, 4 to 4)
0 commit comments