Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#inhmethods)

# AccessibilityNodeInfo.CollectionItemInfo.Builder

*** ** * ** ***

` public static final class AccessibilityNodeInfo.CollectionItemInfo.Builder `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo.Builder |

<br />

*** ** * ** ***

Builder for creating `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo` objects.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#Builder()() ` Creates a new Builder. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#build()() ` Builds and returns a `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo`. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setColumnIndex(int)(int columnIndex) ` Sets the column index at which the item is located. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setColumnSpan(int)(int columnSpan) ` Sets the number of columns the item spans. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setColumnTitle(java.lang.String)(https://developer.android.com/reference/java/lang/String columnTitle) ` Sets the column title at which the item is located. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setHeading(boolean)(boolean heading) ` Sets the collection item is a heading. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setRowIndex(int)(int rowIndex) ` Sets the row index at which the item is located. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setRowSpan(int)(int rowSpan) ` Sets the number of rows the item spans. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setRowTitle(java.lang.String)(https://developer.android.com/reference/java/lang/String rowTitle) ` Sets the row title at which the item is located. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setSelected(boolean)(boolean selected) ` Sets the collection item is selected. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder#setSortDirection(int)(int sortDirection) ` Sets the sort direction for this item. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### Builder

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder ()
```

Creates a new Builder.

<br />

## Public methods

### build

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionItemInfo build ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo` | This value cannot be `null`. <br /> |

### setColumnIndex

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionItemInfo.Builder setColumnIndex (int columnIndex)
```

Sets the column index at which the item is located.

<br />

| Parameters ||
|---|---|
| `columnIndex` | `int`: The column index <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | This builder. This value cannot be `null`. <br /> |

### setColumnSpan

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionItemInfo.Builder setColumnSpan (int columnSpan)
```

Sets the number of columns the item spans.

<br />

| Parameters ||
|---|---|
| `columnSpan` | `int`: The number of columns spans <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | This builder. This value cannot be `null`. <br /> |

### setColumnTitle

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionItemInfo.Builder setColumnTitle (String columnTitle)
```

Sets the column title at which the item is located.

<br />

| Parameters ||
|---|---|
| `columnTitle` | `String`: The column title. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | This builder. This value cannot be `null`. <br /> |

### setHeading

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionItemInfo.Builder setHeading (boolean heading)
```

Sets the collection item is a heading.

<br />

| Parameters ||
|---|---|
| `heading` | `boolean`: The heading state <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | This builder. This value cannot be `null`. <br /> |

### setRowIndex

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionItemInfo.Builder setRowIndex (int rowIndex)
```

Sets the row index at which the item is located.

<br />

| Parameters ||
|---|---|
| `rowIndex` | `int`: The row index <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | This builder. This value cannot be `null`. <br /> |

### setRowSpan

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionItemInfo.Builder setRowSpan (int rowSpan)
```

Sets the number of rows the item spans.

<br />

| Parameters ||
|---|---|
| `rowSpan` | `int`: The number of rows spans <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | This builder. This value cannot be `null`. <br /> |

### setRowTitle

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionItemInfo.Builder setRowTitle (String rowTitle)
```

Sets the row title at which the item is located.

<br />

| Parameters ||
|---|---|
| `rowTitle` | `String`: The row title. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | This builder. This value cannot be `null`. <br /> |

### setSelected

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionItemInfo.Builder setSelected (boolean selected)
```

Sets the collection item is selected.

<br />

| Parameters ||
|---|---|
| `selected` | `boolean`: The number of rows spans <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | This builder. This value cannot be `null`. <br /> |

### setSortDirection

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public AccessibilityNodeInfo.CollectionItemInfo.Builder setSortDirection (int sortDirection)
```

Sets the sort direction for this item.

Valid only if `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#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/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#getSortDirection()` to query the current state.

<br />

| Parameters ||
|---|---|
| `sortDirection` | `int`: the sort direction of this collection item info. Value is one of the following: - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_NONE` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_ASCENDING` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_DESCENDING` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_OTHER` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo.Builder` | This builder. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If `sortDirection` is not one of: - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_NONE` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_ASCENDING` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_DESCENDING` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionItemInfo#SORT_DIRECTION_OTHER` |