SimpleDynamicDocument

A simple implementation of DynamicDocument that delegates to a MutableMap.

This class provides a concrete implementation of the DynamicDocument interface by wrapping an existing mutable map. It supports all standard map operations and provides the additional methods defined in the DynamicDocument interface.

Constructors

Link copied to clipboard
constructor(delegation: MutableMap<String, Any>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The underlying mutable map that stores the document data.

Link copied to clipboard
Link copied to clipboard
open override val keys: MutableSet<String>
Link copied to clipboard
open override val size: Int
Link copied to clipboard
open override val values: MutableCollection<Any>

Functions

Link copied to clipboard
open override fun clear()
Link copied to clipboard
open override fun containsKey(key: String): Boolean
Link copied to clipboard
open override fun containsValue(value: Any): Boolean
Link copied to clipboard
open operator override fun get(key: String): Any?
Link copied to clipboard
open override fun getNestedDocument(key: String): DynamicDocument

Retrieves a nested document, converting it to a DynamicDocument if necessary.

Link copied to clipboard
open fun <V> getValue(key: String): V

Retrieves a value from the document with type casting.

Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open override fun put(key: String, value: Any): Any?
Link copied to clipboard
open override fun putAll(from: Map<out String, Any>)
Link copied to clipboard

Extension function to convert a MutableMap to a SimpleDynamicDocument.