All Downloads are FREE. Search and download functionalities are using the official Maven repository.

name.remal.kotlin.collections.Map.kt Maven / Gradle / Ivy

package name.remal

import java.util.Collections.synchronizedMap
import java.util.stream.Stream

fun  Map.asSynchronized(): Map = synchronizedMap(this)

inline fun  Map.forEachIndexed(action: (index: Int, key: K, value: V) -> Unit) {
    this.entries.forEachIndexed { index, entry ->
        action(index, entry.key, entry.value)
    }
}

fun  Map.stream(): Stream> = entries.stream()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy