# MetaContainer

@Serializable
data class MetaContainer (val map: Map < MetaContainer.Key <*>, Any >)(source)

A polymorphic container for storing heterogeneous key-value pairs with type-safe retrieval. Each key is bound to a specific type, enabling type-safe access to stored values.

## Constructors

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

## Types

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

Builder for constructing MetaContainer instances with a fluent API.

Companion
Link copied to clipboard
object Companion
Key
Link copied to clipboard
interface Key < T : Any >

A marker interface for type-safe keys in MetaContainer.

## Properties

map
Link copied to clipboard
val map : Map < MetaContainer.Key <*>, Any >

The underlying map storing key-value pairs with polymorphic values.

## Functions

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

Checks whether a value exists for the given key.

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

Retrieves a value from the container by its key.