name.remal.kotlin.collections.MutableMap.kt Maven / Gradle / Ivy
package name.remal
import name.remal.collections.ObservableCollections
import name.remal.collections.ObservableMap
import java.util.Collections.synchronizedMap
fun MutableMap.asSynchronized(): MutableMap = synchronizedMap(this)
fun MutableMap.removeAll(keys: Iterable) = keys.forEach { remove(it) }
fun MutableMap.asObservable(): ObservableMap = ObservableCollections.observableMap(this)