Mergeable

Represents a self-merging interface for types that wrap a backing field.

The purpose of this interface is to provide a mechanism to merge two instances of the same type by unwrapping their backing fields, applying a transformation function to these fields, and wrapping the result into a new instance of the same type.

Parameters

ActualWrapper

The specific type implementing the interface.

BackingField

The type of the backing field wrapped by the instances.

Inheritors

Properties

Link copied to clipboard

Function reference to the constructor of the value class.

Link copied to clipboard
abstract val value: BackingField

The backing field that is wrapped in the value class.

Functions

Link copied to clipboard
open fun merge(other: ActualWrapper, transform: Merge<BackingField>): ActualWrapper

Merges this Boxed instance with another Boxed instance to create a new instance of the same type.