# Label

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

*** ** * ** ***


```
@UnstableApi
public class Label
```

<br />

*** ** * ** ***

A label for a `https://developer.android.com/reference/androidx/media3/common/Format`.

## Summary

| ### Public fields |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/common/Label#language()` The language of this label, as an IETF BCP 47 conformant tag, or null if unknown or not applicable. |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/common/Label#value()` The value for this label. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/common/Label#Label(java.lang.String,java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html language, https://developer.android.com/reference/java/lang/String.html value)` Creates a label. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/media3/common/Label#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html o)` |
| `static https://developer.android.com/reference/androidx/media3/common/Label` | `https://developer.android.com/reference/androidx/media3/common/Label#fromBundle(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle.html bundle)` Deserializes an instance from a `https://developer.android.com/reference/android/os/Bundle.html` produced by `https://developer.android.com/reference/androidx/media3/common/Label#toBundle()`. |
| `int` | `https://developer.android.com/reference/androidx/media3/common/Label#hashCode()()` |
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/media3/common/Label#toBundle()()` Serializes this instance to a `https://developer.android.com/reference/android/os/Bundle.html`. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/common/Label#toString()()` |

## Public fields

### language

```
public final @Nullable String language
```

The language of this label, as an IETF BCP 47 conformant tag, or null if unknown or not applicable.

### value

```
public final String value
```

The value for this label.

## Public constructors

### Label

```
public Label(@Nullable String language, String value)
```

Creates a label.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html language` | The language of this label, as an IETF BCP 47 conformant tag, or null if unknown or not applicable. |
| `https://developer.android.com/reference/java/lang/String.html value` | The label value. |

## Public methods

### equals

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

### fromBundle

```
public static Label fromBundle(Bundle bundle)
```

Deserializes an instance from a `https://developer.android.com/reference/android/os/Bundle.html` produced by `https://developer.android.com/reference/androidx/media3/common/Label#toBundle()`.

### hashCode

```
public int hashCode()
```

### toBundle

```
public Bundle toBundle()
```

Serializes this instance to a `https://developer.android.com/reference/android/os/Bundle.html`.

### toString

```
public String toString()
```