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

# AccessibilityNodeInfo.CollectionInfo.Builder

*** ** * ** ***


`
public
static
final

class
AccessibilityNodeInfo.CollectionInfo.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.CollectionInfo.Builder |

<br />

*** ** * ** ***

The builder for CollectionInfo.

## Summary

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

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder#build()() ` Creates a new `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo` instance. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder#setColumnCount(int)(int columnCount) ` Sets the column count. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder#setHierarchical(boolean)(boolean hierarchical) ` Sets whether the collection is hierarchical. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder#setImportantForAccessibilityItemCount(int)(int importantForAccessibilityItemCount) ` Sets the number of views considered important for accessibility. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder#setItemCount(int)(int itemCount) ` Sets the number of items in the collection. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder#setRowCount(int)(int rowCount) ` Sets the row count. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo.Builder#setSelectionMode(int)(int selectionMode) ` Sets the selection mode. |

| ### 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 35](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 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo.CollectionInfo build ()
```

Creates a new `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.CollectionInfo` instance.

<br />

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

### setColumnCount

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

```
public AccessibilityNodeInfo.CollectionInfo.Builder setColumnCount (int columnCount)
```

Sets the column count.

<br />

| Parameters ||
|---|---|
| `columnCount` | `int`: The number of columns in the collection. <br /> |

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

### setHierarchical

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

```
public AccessibilityNodeInfo.CollectionInfo.Builder setHierarchical (boolean hierarchical)
```

Sets whether the collection is hierarchical.

<br />

| Parameters ||
|---|---|
| `hierarchical` | `boolean`: Whether the collection is hierarchical. <br /> |

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

### setImportantForAccessibilityItemCount

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

```
public AccessibilityNodeInfo.CollectionInfo.Builder setImportantForAccessibilityItemCount (int importantForAccessibilityItemCount)
```

Sets the number of views considered important for accessibility.

<br />

| Parameters ||
|---|---|
| `importantForAccessibilityItemCount` | `int`: The number of items important for accessibility. <br /> |

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

### setItemCount

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

```
public AccessibilityNodeInfo.CollectionInfo.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.

<br />

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

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

### setRowCount

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

```
public AccessibilityNodeInfo.CollectionInfo.Builder setRowCount (int rowCount)
```

Sets the row count.

<br />

| Parameters ||
|---|---|
| `rowCount` | `int`: The number of rows in the collection. <br /> |

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

### setSelectionMode

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

```
public AccessibilityNodeInfo.CollectionInfo.Builder setSelectionMode (int selectionMode)
```

Sets the selection mode.

<br />

| Parameters ||
|---|---|
| `selectionMode` | `int`: The selection mode. <br /> |

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