# HlsMediaPlaylist.ClientDefinedAttribute

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

*** ** * ** ***


```
public class HlsMediaPlaylist.ClientDefinedAttribute
```

<br />

*** ** * ** ***

A client defined attribute. See RFC 8216bis, section 4.4.5.1.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/androidx/annotation/IntDef(value = ) @https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) public annotation https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute.Type` The type of the client defined attribute. |

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_DOUBLE() = 2` Type double. |
| `static final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_HEX_TEXT() = 1` Type hex text. |
| `static final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_TEXT() = 0` Type text. |

| ### Public fields |
|---|---|
| `final double` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#doubleValue()` |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#name()` The name of the client defined attribute. |
| `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/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#textValue()` |
| `final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#type()` The type of the client defined attribute. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#ClientDefinedAttribute(java.lang.String,double)(https://developer.android.com/reference/java/lang/String.html name, double value)` Creates an instance of type `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_DOUBLE()`. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#ClientDefinedAttribute(java.lang.String,java.lang.String,int)( https://developer.android.com/reference/java/lang/String.html name, https://developer.android.com/reference/java/lang/String.html value, @https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute.Type int type )` Creates an instance of type `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_TEXT()` or `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_HEX_TEXT()`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html o)` |
| `double` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#getDoubleValue()()` Returns the value if the attribute is of `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_DOUBLE()`. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#getTextValue()()` Returns the text value if the attribute is of `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_TEXT()` or `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_HEX_TEXT()`. |
| `int` | `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#hashCode()()` |

## Constants

### TYPE_DOUBLE

```
public static final int TYPE_DOUBLE = 2
```

Type double. See RFC 8216bis, section 4.2, decimal-floating-point.

### TYPE_HEX_TEXT

```
public static final int TYPE_HEX_TEXT = 1
```

Type hex text. See RFC 8216bis, section 4.2, hexadecimal-sequence.

### TYPE_TEXT

```
public static final int TYPE_TEXT = 0
```

Type text. See RFC 8216bis, section 4.2, quoted-string.

## Public fields

### doubleValue

```
public final double doubleValue
```

### name

```
public final String name
```

The name of the client defined attribute.

### textValue

```
public final @Nullable String textValue
```

### type

```
public final int type
```

The type of the client defined attribute.

## Public constructors

### ClientDefinedAttribute

```
public ClientDefinedAttribute(String name, double value)
```

Creates an instance of type `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_DOUBLE()`.

### ClientDefinedAttribute

```
public ClientDefinedAttribute(
    String name,
    String value,
    @HlsMediaPlaylist.ClientDefinedAttribute.Type int type
)
```

Creates an instance of type `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_TEXT()` or `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_HEX_TEXT()`.

## Public methods

### equals

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

### getDoubleValue

```
public double getDoubleValue()
```

Returns the value if the attribute is of `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_DOUBLE()`.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | if the attribute is not of type `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_TEXT()` or `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_HEX_TEXT()`. |

### getTextValue

```
public String getTextValue()
```

Returns the text value if the attribute is of `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_TEXT()` or `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_HEX_TEXT()`.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | if the attribute is not of type `https://developer.android.com/reference/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute#TYPE_DOUBLE()`. |

### hashCode

```
public int hashCode()
```