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

com.github.frtu.kotlin.tool.function.FunctionRegistryBuilder.kt Maven / Gradle / Ivy

There is a newer version: 2.0.9
Show newest version
package com.github.frtu.kotlin.tool.function

import com.github.frtu.kotlin.tool.builder.BuilderMarker

class FunctionRegistryBuilder(
    private val functionRegistry: FunctionRegistry = FunctionRegistry()
) {
    fun register(function: Function<*, *>) = functionRegistry.register(function)

    fun build(): FunctionRegistry = functionRegistry
}


@BuilderMarker
fun registry(actions: FunctionRegistryBuilder.() -> Unit): FunctionRegistry =
    FunctionRegistryBuilder().apply(actions).build()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy