# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Ctors | Methods | Inherited Methods

# AccessibilityNodeInfo.CollectionInfo

`public static final class AccessibilityNodeInfo.CollectionInfo`
`extends Object` ``

java.lang.Object
↳ | android.view.accessibility.AccessibilityNodeInfo.CollectionInfo

Class with information if a node is a collection. Use `CollectionInfo#obtain(int, int, boolean)` to get an instance. Recycling is handled by the `AccessibilityNodeInfo` to which this object is attached.

A collection of items has rows and columns and may be hierarchical. For example, a horizontal list is a collection with one column, as many rows as the list items, and is not hierarchical; A table is a collection with several rows, several columns, and is not hierarchical; A vertical tree is a hierarchical collection with one column and as many rows as the first level children.

## Summary

### Constants
`int` | `SELECTION_MODE_MULTIPLE` Selection mode where multiple items may be selected.
`int` | `SELECTION_MODE_NONE` Selection mode where items are not selectable.
`int` | `SELECTION_MODE_SINGLE` Selection mode where a single item may be selected.

### Public constructors
`CollectionInfo(int rowCount, int columnCount, boolean hierarchical)` Creates a new instance.
`CollectionInfo(int rowCount, int columnCount, boolean hierarchical, int selectionMode)` Creates a new instance.

### Public methods
`int` | `getColumnCount()` Gets the number of columns.
`int` | `getRowCount()` Gets the number of rows.
`int` | `getSelectionMode()` Gets the collection's selection mode.
`boolean` | `isHierarchical()` Gets if the collection is a hierarchically ordered.
`static AccessibilityNodeInfo.CollectionInfo` | `obtain(int rowCount, int columnCount, boolean hierarchical, int selectionMode)` Obtains a pooled instance.
`static AccessibilityNodeInfo.CollectionInfo` | `obtain(int rowCount, int columnCount, boolean hierarchical)` Obtains a pooled instance.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### SELECTION_MODE_MULTIPLE

    public static final int SELECTION_MODE_MULTIPLE

Selection mode where multiple items may be selected.

Constant Value: 2 (0x00000002)

### SELECTION_MODE_NONE

    public static final int SELECTION_MODE_NONE

Selection mode where items are not selectable.

Constant Value: 0 (0x00000000)

### SELECTION_MODE_SINGLE

    public static final int SELECTION_MODE_SINGLE

Selection mode where a single item may be selected.

Constant Value: 1 (0x00000001)

## Public constructors

### CollectionInfo

    public CollectionInfo (int rowCount,
                    int columnCount,
                    boolean hierarchical)

Creates a new instance.

Parameters
`rowCount` | `int`: The number of rows.
`columnCount` | `int`: The number of columns.
`hierarchical` | `boolean`: Whether the collection is hierarchical.

### CollectionInfo

    public CollectionInfo (int rowCount,
                    int columnCount,
                    boolean hierarchical,
                    int selectionMode)

Creates a new instance.

Parameters
`rowCount` | `int`: The number of rows.
`columnCount` | `int`: The number of columns.
`hierarchical` | `boolean`: Whether the collection is hierarchical.
`selectionMode` | `int`: The collection's selection mode.

## Public methods

### getColumnCount

    public int getColumnCount ()

Gets the number of columns.

Returns
`int` | The column count, or -1 if count is unknown.

### getRowCount

    public int getRowCount ()

Gets the number of rows.

Returns
`int` | The row count, or -1 if count is unknown.

### getSelectionMode

    public int getSelectionMode ()

Gets the collection's selection mode.

Returns
`int` | The collection's selection mode, one of: `SELECTION_MODE_NONE` `SELECTION_MODE_SINGLE` `SELECTION_MODE_MULTIPLE`

### isHierarchical

    public boolean isHierarchical ()

Gets if the collection is a hierarchically ordered.

Returns
`boolean` | Whether the collection is hierarchical.

### obtain

    public static AccessibilityNodeInfo.CollectionInfo obtain (int rowCount,
                    int columnCount,
                    boolean hierarchical,
                    int selectionMode)

Obtains a pooled instance.

In most situations object pooling is not beneficial. Create a new instance using the constructor `AccessibilityNodeInfo.CollectionInfo#CollectionInfo(int, int, boolean, int)` instead.

Parameters
`rowCount` | `int`: The number of rows.
`columnCount` | `int`: The number of columns.
`hierarchical` | `boolean`: Whether the collection is hierarchical.
`selectionMode` | `int`: The collection's selection mode, one of: `SELECTION_MODE_NONE` `SELECTION_MODE_SINGLE` `SELECTION_MODE_MULTIPLE`

Returns
`AccessibilityNodeInfo.CollectionInfo` |

### obtain

    public static AccessibilityNodeInfo.CollectionInfo obtain (int rowCount,
                    int columnCount,
                    boolean hierarchical)

Obtains a pooled instance.

In most situations object pooling is not beneficial. Create a new instance using the constructor `AccessibilityNodeInfo.CollectionInfo#CollectionInfo(int, int, boolean)` instead.

Parameters
`rowCount` | `int`: The number of rows, or -1 if count is unknown.
`columnCount` | `int`: The number of columns, or -1 if count is unknown.
`hierarchical` | `boolean`: Whether the collection is hierarchical.

Returns
`AccessibilityNodeInfo.CollectionInfo` |

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*