Builder

class Builder(map: MutableMap<MetaContainer.Key<*>, Any> = mutableMapOf<Key<*>, Any>())(source)

Builder for constructing MetaContainer instances with a fluent API.

Constructors

Link copied to clipboard
constructor(map: MutableMap<MetaContainer.Key<*>, Any> = mutableMapOf<Key<*>, Any>())

Functions

Link copied to clipboard

Builds and returns the immutable MetaContainer instance.

Link copied to clipboard
operator fun <T : Any> contains(key: MetaContainer.Key<T>): Boolean

Checks whether a value exists for the given key in the builder.

Link copied to clipboard
operator fun <T : Any> get(key: MetaContainer.Key<T>): T?

Retrieves a value from the builder by its key.

Link copied to clipboard
fun <T : Any> put(k: MetaContainer.Key<T>, v: T)

Puts a value associated with the given key into the builder.