# AccessibilityNodeInfoCompat.CollectionItemInfoCompat.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.CollectionItemInfoCompat.Builder) Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/core#1.12.0)

*** ** * ** ***


```
public final class AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder
```

<br />

*** ** * ** ***

Builder for creating `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.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.CollectionItemInfoCompat` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#build()()` Builds and returns a `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.html`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#setColumnIndex(int)(int columnIndex)` Sets the column index at which the item is located. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#setColumnSpan(int)(int columnSpan)` Sets the number of columns the item spans. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#setColumnTitle(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html columnTitle)` Sets the column title at which the item is located. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#setHeading(boolean)(boolean heading)` Sets the collection item is a heading. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#setRowIndex(int)(int rowIndex)` Sets the row index at which the item is located. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#setRowSpan(int)(int rowSpan)` Sets the number of rows the item spans. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#setRowTitle(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html rowTitle)` Sets the row title at which the item is located. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#setSelected(boolean)(boolean selected)` Sets the collection item is selected. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder` | `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder#setSortDirection(int)(int sortDirection)` Sets the sort direction for this item. |

## Public constructors

### Builder

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

```
public Builder()
```

Creates a new Builder.

## Public methods

### build

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

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

Builds and returns a `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.html`.

### setColumnIndex

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

```
public @NonNull AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder setColumnIndex(int columnIndex)
```

Sets the column index at which the item is located.

| Parameters |
|---|---|
| `int columnIndex` | The column index |

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

### setColumnSpan

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

```
public @NonNull AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder setColumnSpan(int columnSpan)
```

Sets the number of columns the item spans.

| Parameters |
|---|---|
| `int columnSpan` | The number of columns spans |

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

### setColumnTitle

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

```
public @NonNull AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder setColumnTitle(@Nullable String columnTitle)
```

Sets the column title at which the item is located.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html columnTitle` | The column title |

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

### setHeading

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

```
public @NonNull AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder setHeading(boolean heading)
```

Sets the collection item is a heading.

| Parameters |
|---|---|
| `boolean heading` | The heading state |

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

### setRowIndex

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

```
public @NonNull AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder setRowIndex(int rowIndex)
```

Sets the row index at which the item is located.

| Parameters |
|---|---|
| `int rowIndex` | The row index |

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

### setRowSpan

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

```
public @NonNull AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder setRowSpan(int rowSpan)
```

Sets the number of rows the item spans.

| Parameters |
|---|---|
| `int rowSpan` | The number of rows spans |

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

### setRowTitle

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

```
public @NonNull AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder setRowTitle(@Nullable String rowTitle)
```

Sets the row title at which the item is located.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html rowTitle` | The row title |

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

### setSelected

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

```
public @NonNull AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder setSelected(boolean selected)
```

Sets the collection item is selected.

| Parameters |
|---|---|
| `boolean selected` | The number of rows spans |

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

### setSortDirection

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

```
public @NonNull AccessibilityNodeInfoCompat.CollectionItemInfoCompat.Builder setSortDirection(int sortDirection)
```

Sets the sort direction for this item.

Valid only if `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.html#isHeading()` returns `true`. Indicates that collection content associated with this heading is presented in the indicated sort direction. It should only be called by accessibility providers. For accessibility services, see `https://developer.android.com/reference/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.CollectionItemInfoCompat#getSortDirection()` to query the current state.

| Parameters |
|---|---|
| `int sortDirection` | the sort direction of this collection item info |

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