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

de.lise.fluxflow.mongo.generic.GenericMap.kt Maven / Gradle / Ivy

Go to download

A flexible workflow engine that helps to create and orchestrate business processes using domain code.

The newest version!
package de.lise.fluxflow.mongo.generic

typealias GenericMap = Map>

fun Map.toGenericMap(): GenericMap {
    return this.mapValues {
        GenericMapEntry(it.value)
    }
}

fun GenericMap.toTypeSafeData(): Map {
    return this.mapValues {
        it.value.spec.assertType(it.value.value)
    }
}

fun Map.withData(dataMap: Map): GenericMap {
    return this.mapValues {
        GenericMapEntry(
            it.value,
            dataMap[it.key]
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy