com.ancientlightstudios.quarkus.kotlin.openapi.utils.MapExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
A Maven plugin to use the OpenAPI generator.
package com.ancientlightstudios.quarkus.kotlin.openapi.utils
fun MutableMap.pop(): Pair? = entries.firstOrNull()?.let {
remove(it.key)
it.key to it.value
}
fun MutableMap.pop(block: (K, V) -> Unit) = pop()?.let { block(it.first, it.second) }