DynamicDocument

Interface representing a dynamic document that can store arbitrary key-value pairs.

This interface extends MutableMap and provides additional convenience methods for type-safe value retrieval and nested document access. It's designed for working with dynamic data structures where the schema is not known at compile time.

Inheritors

Properties

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

Functions

Link copied to clipboard
abstract fun clear()
Link copied to clipboard
abstract fun containsKey(key: String): Boolean
Link copied to clipboard
abstract fun containsValue(value: Any): Boolean
Link copied to clipboard
abstract operator fun get(key: String): Any?
Link copied to clipboard

Retrieves a nested document from the current document.

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

Retrieves a value from the document with type casting.

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

Extension function to convert a MutableMap to a SimpleDynamicDocument.