# SemanticsConfiguration

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/semantics/SemanticsConfiguration.kt+class:androidx.compose.ui.semantics.SemanticsConfiguration) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  class SemanticsConfiguration : SemanticsPropertyReceiver, Iterable<Map.Entry<SemanticsPropertyKey<*>, Any?>>
  ```

*** ** * ** ***

Describes the semantic information associated with the owning component

The information provided in the configuration is used to to generate the semantics tree.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#SemanticsConfiguration()()` | Cmn |

| ### Public functions |
|---|---|---|
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#contains(androidx.compose.ui.semantics.SemanticsPropertyKey)(key: https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsPropertyKey<T>)` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#copy()()` Returns an exact copy of this configuration. | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `operator T` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#get(androidx.compose.ui.semantics.SemanticsPropertyKey)(key: https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsPropertyKey<T>)` Retrieves the value for the given property, if one has been set. | Cmn |
| `T` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#getOrElse(androidx.compose.ui.semantics.SemanticsPropertyKey,kotlin.Function0)(key: https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsPropertyKey<T>, defaultValue: () -> T)` | Cmn |
| `T?` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#getOrElseNullable(androidx.compose.ui.semantics.SemanticsPropertyKey,kotlin.Function0)( key: https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsPropertyKey<T>, defaultValue: () -> T? )` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#hashCode()()` | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterator/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/-entry/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsPropertyKey<*>, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>>` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#iterator()()` | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#set(androidx.compose.ui.semantics.SemanticsPropertyKey,kotlin.Any)(key: https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsPropertyKey<T>, value: T)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#isClearingSemantics()` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#isMergingSemanticsOfDescendants()` Whether the semantic information provided by the owning component and all of its descendants should be treated as one logical entity. | Cmn |

| ### Extension functions |
|---|---|---|
| `T?` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration.https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration#(androidx.compose.ui.semantics.SemanticsConfiguration).getOrNull(androidx.compose.ui.semantics.SemanticsPropertyKey)(key: https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsPropertyKey<T>)` | Cmn |

## Public constructors

### SemanticsConfiguration

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

```
SemanticsConfiguration()
```

## Public functions

### contains

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

```
operator fun <T : Any?> contains(key: SemanticsPropertyKey<T>): Boolean
```

### copy

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

```
fun copy(): SemanticsConfiguration
```

Returns an exact copy of this configuration.

### equals

Cmn

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

### get

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

```
operator fun <T : Any?> get(key: SemanticsPropertyKey<T>): T
```

Retrieves the value for the given property, if one has been set. If a value has not been set, throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html`

### getOrElse

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

```
fun <T : Any?> getOrElse(key: SemanticsPropertyKey<T>, defaultValue: () -> T): T
```

### getOrElseNullable

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

```
fun <T : Any?> getOrElseNullable(
    key: SemanticsPropertyKey<T>,
    defaultValue: () -> T?
): T?
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### iterator

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

```
open operator fun iterator(): Iterator<Map.Entry<SemanticsPropertyKey<*>, Any?>>
```

### set

Cmn

```
open operator fun <T : Any?> set(key: SemanticsPropertyKey<T>, value: T): Unit
```

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### isClearingSemantics

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

```
var isClearingSemantics: Boolean
```

### isMergingSemanticsOfDescendants

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

```
var isMergingSemanticsOfDescendants: Boolean
```

Whether the semantic information provided by the owning component and all of its descendants should be treated as one logical entity.

If set to true, the descendants of the owning component's `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsNode` will merge their semantic information into the `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsNode` representing the owning component.

## Extension functions

### SemanticsConfiguration.getOrNull

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/semantics/SemanticsConfiguration.kt+function:getOrNull)

```
fun <T : Any?> SemanticsConfiguration.getOrNull(key: SemanticsPropertyKey<T>): T?
```