# TrackSelectionArray

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/trackselection/TrackSelectionArray.java+class:androidx.media3.exoplayer.trackselection.TrackSelectionArray)

*** ** * ** ***


```
@UnstableApi
public final class TrackSelectionArray
```

<br />

*** ** * ** ***

An array of `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelection`s.

## Summary

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelectionArray#length()` The length of this array. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelectionArray#TrackSelectionArray(androidx.media3.exoplayer.trackselection.TrackSelection...)(@https://developer.android.com/reference/androidx/media3/common/util/NullableType TrackSelection[] trackSelections)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelectionArray#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html obj)` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelection` | `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelectionArray#get(int)(int index)` Returns the selection at a given index. |
| `TrackSelection[]` | `@https://developer.android.com/reference/androidx/media3/common/util/NullableType https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelectionArray#getAll()()` Returns the selections in a newly allocated array. |
| `int` | `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelectionArray#hashCode()()` |

## Public fields

### length

```
public final int length
```

The length of this array.

## Public constructors

### TrackSelectionArray

```
public TrackSelectionArray(@NullableType TrackSelection[] trackSelections)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/util/NullableType TrackSelection[] trackSelections` | The selections. Must not be null, but may contain null elements. |

## Public methods

### equals

```
public boolean equals(@Nullable Object obj)
```

### get

```
public @Nullable TrackSelection get(int index)
```

Returns the selection at a given index.

| Parameters |
|---|---|
| `int index` | The index of the selection. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelection` | The selection. |

### getAll

```
@NullableType
public TrackSelection[] getAll()
```

Returns the selections in a newly allocated array.

### hashCode

```
public int hashCode()
```