commonMain.io.github.windedge.copybuilder.CopyBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of copybuilder-runtime Show documentation
Show all versions of copybuilder-runtime Show documentation
Construct an object with copy and map
The newest version!
package io.github.windedge.copybuilder
public interface CopyBuilder {
public fun contains(key: String): Boolean
public fun get(key: String): Any?
public fun put(key: String, value: Any?)
public fun build(): T
}
public interface CopyBuilderHost {
public fun toCopyBuilder(): CopyBuilder = TODO("Implemented in KopyBuilder Plugin")
public fun copyBuild(initialize: CopyBuilder.() -> Unit): T {
val builder = toCopyBuilder()
builder.initialize()
return builder.build()
}
}