# Chapter.Builder

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

*** ** * ** ***


```
public class Chapter.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder#Builder()()` Constructs an instance. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter` | `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder#build()()` Builds a `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter` instance with the provided values. |
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder#setEndTimeMs(long)(long endTimeMs)` Sets the end time of the chapter, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if not known. |
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder#setHidden(boolean)(boolean isHidden)` Sets whether the chapter is hidden. |
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder#setStartTimeMs(long)(long startTimeMs)` Sets the start time of the chapter, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if not known. |
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter.Builder#setTitle(androidx.media3.common.Label)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/Label title)` Sets the title of this chapter, or `null` if not known. |

## Public constructors

### Builder

```
public Builder()
```

Constructs an instance.

## Public methods

### build

```
public Chapter build()
```

Builds a `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter` instance with the provided values.

### setEndTimeMs

```
@CanIgnoreReturnValue
public Chapter.Builder setEndTimeMs(long endTimeMs)
```

Sets the end time of the chapter, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if not known.

Defaults to `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter#getEndTimeMs()` |   |

### setHidden

```
@CanIgnoreReturnValue
public Chapter.Builder setHidden(boolean isHidden)
```

Sets whether the chapter is hidden.

Defaults to `false`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter#isHidden()` |   |

### setStartTimeMs

```
@CanIgnoreReturnValue
public Chapter.Builder setStartTimeMs(long startTimeMs)
```

Sets the start time of the chapter, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if not known.

Defaults to `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter#getStartTimeMs()` |   |

### setTitle

```
@CanIgnoreReturnValue
public Chapter.Builder setTitle(@Nullable Label title)
```

Sets the title of this chapter, or `null` if not known.

Defaults to `null`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/extractor/metadata/Chapter#getTitle()` |   |