MutableBoundEntry

Represents a mutable binding between a key, its associated type, and a MutablePersistentDataContainer.

This class extends BoundEntry to allow modification of the value in the container associated with the specific key and PersistentDataType.

The MutableBoundEntry facilitates setting and updating the value in the container programmatically via the set method or by delegation.

Author

Fantamomo

Since

3.2-SNAPSHOT

Parameters

P

The primitive data type.

C

The complex data type.

key

The key associated with the value in the container.

type

The type used to serialize/deserialize the value.

Constructors

Link copied to clipboard
constructor(container: MutablePersistentDataContainer, key: String, type: PersistentDataType<P, C>)

Properties

Link copied to clipboard
val key: String

The key associated with the value in the container.

Link copied to clipboard

The type used to serialize/deserialize the value.

Functions

Link copied to clipboard
open fun get(): C?

Retrieves the value associated with the specified key and type from the container.

Link copied to clipboard
open operator fun getValue(thisRef: Any?, property: KProperty<*>): C?

Retrieves the value associated with the given key and type from the container.

Link copied to clipboard
fun set(value: C)

Sets the value associated with the specific key and type in the container.

Link copied to clipboard
operator fun setValue(thisRef: Any?, property: KProperty<*>, value: C)

Sets the value associated with the given key and type in the container.