A2uiComponentProperties

class A2uiComponentProperties


An immutable wrapper around the raw component property map supplied by the A2UI protocol.

This class represents a frozen snapshot of a component's payload. It provides mechanisms to extract property values and guarantees efficient O(1) equality checking to optimize Compose recompositions, as structural equality is checked by A2uiComponentRegistry before creating a new instance of A2uiComponentProperties.

Summary

Public functions

operator Boolean
contains(property: A2uiProperty<*>)

Checks whether the specified property is present in the component's payload.

open operator Boolean
equals(other: Any?)
operator T?
<T : Any?> get(property: StaticA2uiProperty<T>)

Retrieves the property value for a given static property.

open Int

Public functions

contains

Added in 1.0.0-alpha01
operator fun contains(property: A2uiProperty<*>): Boolean

Checks whether the specified property is present in the component's payload.

Parameters
property: A2uiProperty<*>

property to check for presence

Returns
Boolean

true if the property is present in the payload, false otherwise

equals

open operator fun equals(other: Any?): Boolean

get

Added in 1.0.0-alpha01
operator fun <T : Any?> get(property: StaticA2uiProperty<T>): T?

Retrieves the property value for a given static property.

Note: This does not evaluate dynamic expressions or bindings.

Parameters
property: StaticA2uiProperty<T>

The static property to retrieve.

Returns
T?

The property value, or null if the property is missing and is not required.

Throws
IllegalStateException

If the property is required but missing, or if the value is of an invalid type. These cases indicate a mismatch in the property definition, as incoming payloads are expected to be validated before reaching the UI.

hashCode

open fun hashCode(): Int