# A2uiComponentCollection

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


```
sealed interface A2uiComponentCollection : List<A2uiComponent>
```

<br />

*** ** * ** ***

An immutable, indexed collection of `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent`s registered within an `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog`.

Provides list-based access that enables iterator-free iteration using indices, as well as lookup by component name using the index operator.

## Summary

| ### Public functions |
|---|---|
| `operator https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent?` | `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponentCollection#get(kotlin.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Retrieves an `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent` implementation by its unique type name. |

### Inherited functions

From [kotlin.collections.Collection](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html) `open https://developer.android.com/reference/java/util/stream/Stream.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/parallel-stream.html()` `open https://developer.android.com/reference/java/util/stream/Stream.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/stream.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>` `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/to-array.html(generator: https://developer.android.com/reference/java/util/function/IntFunction.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T>>)` From [kotlin.collections.Iterable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterable/for-each.html(@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull action: https://developer.android.com/reference/java/util/function/Consumer.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>)` From [kotlin.collections.List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html) `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/contains.html(element: https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/contains-all.html(elements: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>)` `operator https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/get.html(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `open https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/get-first.html()` `open https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/get-last.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index-of.html(element: https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/is-empty.html()` `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-iterator/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/iterator.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/last-index-of.html(element: https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list-iterator/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/list-iterator.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list-iterator/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/list-iterator.html(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/reversed.html()` `open https://developer.android.com/reference/java/util/Spliterator.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>` `@https://developer.android.com/reference/kotlin/androidx/annotation/RecentlyNonNull
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/spliterator.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/sub-list.html(fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

### Inherited properties

From [kotlin.collections.List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/size.html`

## Public functions

### get

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

```
operator fun get(name: String): A2uiComponent?
```

Retrieves an `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent` implementation by its unique type name.

| Parameters |
|---|---|
| `name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The unique type name of the component (e.g., `"Text"`, `"Button"`). |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent?` | The `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent` implementation, or `null` if no component with `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponentCollection#get(kotlin.String)` is registered in this collection. |