# AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java+class:androidx.core.view.accessibility.AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder) Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/core#1.15.0)

*** ** * ** ***


```
public final class AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder
```

<br />

*** ** * ** ***

Class for building `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder#Builder()()` Creates a new Builder. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder#build()()` Creates a new `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat` instance. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder#setColumnCount(int)(int columnCount)` Sets the column count. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder#setHierarchical(boolean)(boolean hierarchical)` Sets whether the collection is hierarchical. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder#setImportantForAccessibilityItemCount(int)( int importantForAccessibilityItemCount )` Sets the number of views considered important for accessibility. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder#setItemCount(int)(int itemCount)` Sets the number of items in the collection. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder#setRowCount(int)(int rowCount)` Sets the row count. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder#setSelectionMode(int)(int selectionMode)` Sets the selection mode. |

## Public constructors

### Builder

Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/core#1.15.0)

```
public Builder()
```

Creates a new Builder.

## Public methods

### build

Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/core#1.15.0)

```
public @NonNull AccessibilityNodeInfoCompat.CollectionInfoCompat build()
```

Creates a new `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat` instance.

### setColumnCount

Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/core#1.15.0)

```
public @NonNull AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder setColumnCount(int columnCount)
```

Sets the column count.

| Parameters |
|---|---|
| `int columnCount` | The number of columns in the collection. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | This builder. |

### setHierarchical

Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/core#1.15.0)

```
public @NonNull AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder setHierarchical(boolean hierarchical)
```

Sets whether the collection is hierarchical.

| Parameters |
|---|---|
| `boolean hierarchical` | Whether the collection is hierarchical. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | This builder. |

### setImportantForAccessibilityItemCount

Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/core#1.15.0)

```
public @NonNull AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder setImportantForAccessibilityItemCount(
    int importantForAccessibilityItemCount
)
```

Sets the number of views considered important for accessibility.

| Parameters |
|---|---|
| `int importantForAccessibilityItemCount` | The number of items important for accessibility. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | This builder. |

### setItemCount

Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/core#1.15.0)

```
public @NonNull AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder setItemCount(int itemCount)
```

Sets the number of items in the collection. Can be optionally set for ViewGroups with clear row and column semantics; should be set for all other clients.

| Parameters |
|---|---|
| `int itemCount` | The number of items in the collection. This should be set to `UNDEFINED` if the item count is not known. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | This builder. |

### setRowCount

Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/core#1.15.0)

```
public @NonNull AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder setRowCount(int rowCount)
```

Sets the row count.

| Parameters |
|---|---|
| `int rowCount` | The number of rows in the collection. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | This builder. |

### setSelectionMode

Added in [1.15.0](https://developer.android.com/jetpack/androidx/releases/core#1.15.0)

```
public @NonNull AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder setSelectionMode(int selectionMode)
```

Sets the selection mode.

| Parameters |
|---|---|
| `int selectionMode` | The selection mode. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionInfoCompat.Builder` | This builder. |