# CompositionGroup

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

  ```
  interface CompositionGroup : CompositionData
  ```

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup` is a group of data slots tracked independently by composition. These groups correspond to flow control branches (such as if statements and function calls) as well as emitting of a node to the tree.

This interface is not intended to be used directly and is provided to allow the tools API to have access to data tracked during composition. The tools API should be used instead which provides a more usable interpretation of the slot table.

## Summary

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#data()` The data stored in the slot table for this group. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#groupSize()` The total number of groups, including itself, that this group contains. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#identity()` A value that identifies a Group independently of movement caused by recompositions. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#key()` A value used to identify the group within its siblings and is typically a compiler generated integer but can be an object if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#key()` composable is used. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#node()` If the group represents a node this returns a non-null value which is the node that was emitted for the group. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#slotsSize()` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#sourceInfo()` Information recorded by the compiler to help tooling identify the source that generated the group. | Cmn |

| ### Extension functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/tooling/data/ParameterInformation>` | `@https://developer.android.com/reference/kotlin/androidx/compose/ui/tooling/data/UiToolingDataApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup.https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#(androidx.compose.runtime.tooling.CompositionGroup).findParameters(androidx.compose.ui.tooling.data.ContextCache)(cache: https://developer.android.com/reference/kotlin/androidx/compose/ui/tooling/data/ContextCache?)` Return the parameters found for this `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup`. | android |

### Inherited functions

From [androidx.compose.runtime.tooling.CompositionData](https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionData) `open https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup?` `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionData#find(kotlin.Any)(identityToFind: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`

Find a sub-group by identity.
Cmn

### Inherited properties

From [androidx.compose.runtime.tooling.CompositionData](https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionData) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html<https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup>` `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionData#compositionGroups()`

Iterate the composition data in the group.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionData#isEmpty()`

Returns true if no composition data has been collected.
Cmn

## Public properties

### data

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

```
val data: Iterable<Any?>
```

The data stored in the slot table for this group. This information includes the values stored for parameters that are checked for change, any value passed as a parameter for `https://developer.android.com/reference/kotlin/androidx/compose/runtime/remember.composable#remember(kotlin.Function0)` and the last value returned by `https://developer.android.com/reference/kotlin/androidx/compose/runtime/remember.composable#remember(kotlin.Function0)`, etc.

### groupSize

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

```
open val groupSize: Int
```

The total number of groups, including itself, that this group contains.

### identity

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

```
open val identity: Any?
```

A value that identifies a Group independently of movement caused by recompositions.

### key

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

```
val key: Any
```

A value used to identify the group within its siblings and is typically a compiler generated integer but can be an object if the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup#key()` composable is used.

### node

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

```
val node: Any?
```

If the group represents a node this returns a non-null value which is the node that was emitted for the group.

### slotsSize

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

```
open val slotsSize: Int
```

### sourceInfo

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

```
val sourceInfo: String?
```

Information recorded by the compiler to help tooling identify the source that generated the group. The format of this string is internal and is interpreted by the tools API which translates this information into source file name and offsets.

## Extension functions

### CompositionGroup.findParameters

android Artifact: [androidx.compose.ui:ui-tooling-data](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/tooling/data/SlotTree.jvmAndAndroid.kt+function:findParameters)

```
@UiToolingDataApi
fun CompositionGroup.findParameters(cache: ContextCache? = null): List<ParameterInformation>
```

Return the parameters found for this `https://developer.android.com/reference/kotlin/androidx/compose/runtime/tooling/CompositionGroup`.