# A2uiComponentProperties

Artifact: [androidx.a2ui.compose:compose-runtime](https://developer.android.com/jetpack/androidx/releases/a2ui-compose) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/compose/runtime/A2uiComponentProperties.kt+class:androidx.a2ui.compose.runtime.A2uiComponentProperties) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui-compose#1.0.0-alpha02)


```
class A2uiComponentProperties
```

<br />

*** ** * ** ***

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 `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentRegistry` before creating a new instance of `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentProperties`.

## Summary

| ### Public functions |
|---|---|
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentProperties#contains(androidx.a2ui.compose.runtime.A2uiProperty)(property: https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiProperty<*>)` Checks whether the specified `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentProperties#contains(androidx.a2ui.compose.runtime.A2uiProperty)` is present in the component's payload. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentProperties#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `operator T?` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentProperties#get(androidx.a2ui.compose.runtime.StaticA2uiProperty)(property: https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/StaticA2uiProperty<T>)` Retrieves the property value for a given static property. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentProperties#hashCode()()` |

## Public functions

### contains

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui-compose#1.0.0-alpha02)

```
operator fun contains(property: A2uiProperty<*>): Boolean
```

Checks whether the specified `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentProperties#contains(androidx.a2ui.compose.runtime.A2uiProperty)` is present in the component's payload.

| Parameters |
|---|---|
| `property: https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiProperty<*>` | property to check for presence |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `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-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui-compose#1.0.0-alpha02)

```
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: https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/StaticA2uiProperty<T>` | The static property to retrieve. |

| Returns |
|---|---|
| `T?` | The property value, or `null` if the property is missing and is not required. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | 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
```