public static class MediaSegment.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
MediaSegment |
build()
Builds a new
MediaSegment. |
MediaSegment.Builder |
byteRange(ByteRange byteRange)
Initializes the optional value
byteRange to byteRange. |
MediaSegment.Builder |
byteRange(java.util.Optional<? extends ByteRange> byteRange)
Initializes the optional value
byteRange to byteRange. |
MediaSegment.Builder |
discontinuity(boolean discontinuity)
Initializes the value for the
discontinuity attribute. |
MediaSegment.Builder |
duration(double duration)
Initializes the value for the
duration attribute. |
MediaSegment.Builder |
from(MediaSegment instance)
Fill a builder with attribute values from the provided
MediaSegment instance. |
MediaSegment.Builder |
programDateTime(java.time.OffsetDateTime programDateTime)
Initializes the optional value
programDateTime to programDateTime. |
MediaSegment.Builder |
programDateTime(java.util.Optional<? extends java.time.OffsetDateTime> programDateTime)
Initializes the optional value
programDateTime to programDateTime. |
MediaSegment.Builder |
segmentKey(java.util.Optional<? extends SegmentKey> segmentKey)
Initializes the optional value
segmentKey to segmentKey. |
MediaSegment.Builder |
segmentKey(SegmentKey segmentKey)
Initializes the optional value
segmentKey to segmentKey. |
MediaSegment.Builder |
segmentMap(java.util.Optional<? extends SegmentMap> segmentMap)
Initializes the optional value
segmentMap to segmentMap. |
MediaSegment.Builder |
segmentMap(SegmentMap segmentMap)
Initializes the optional value
segmentMap to segmentMap. |
MediaSegment.Builder |
title(java.util.Optional<java.lang.String> title)
Initializes the optional value
title to title. |
MediaSegment.Builder |
title(java.lang.String title)
Initializes the optional value
title to title. |
MediaSegment.Builder |
uri(java.lang.String uri)
Initializes the value for the
uri attribute. |
public final MediaSegment.Builder from(MediaSegment instance)
MediaSegment instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final MediaSegment.Builder duration(double duration)
duration attribute.duration - The value for durationthis builder for use in a chained invocationpublic final MediaSegment.Builder title(java.lang.String title)
title to title.title - The value for titlethis builder for chained invocationpublic final MediaSegment.Builder title(java.util.Optional<java.lang.String> title)
title to title.title - The value for titlethis builder for use in a chained invocationpublic final MediaSegment.Builder uri(java.lang.String uri)
uri attribute.uri - The value for urithis builder for use in a chained invocationpublic final MediaSegment.Builder byteRange(ByteRange byteRange)
byteRange to byteRange.byteRange - The value for byteRangethis builder for chained invocationpublic final MediaSegment.Builder byteRange(java.util.Optional<? extends ByteRange> byteRange)
byteRange to byteRange.byteRange - The value for byteRangethis builder for use in a chained invocationpublic final MediaSegment.Builder programDateTime(java.time.OffsetDateTime programDateTime)
programDateTime to programDateTime.programDateTime - The value for programDateTimethis builder for chained invocationpublic final MediaSegment.Builder programDateTime(java.util.Optional<? extends java.time.OffsetDateTime> programDateTime)
programDateTime to programDateTime.programDateTime - The value for programDateTimethis builder for use in a chained invocationpublic final MediaSegment.Builder segmentMap(SegmentMap segmentMap)
segmentMap to segmentMap.segmentMap - The value for segmentMapthis builder for chained invocationpublic final MediaSegment.Builder segmentMap(java.util.Optional<? extends SegmentMap> segmentMap)
segmentMap to segmentMap.segmentMap - The value for segmentMapthis builder for use in a chained invocationpublic final MediaSegment.Builder segmentKey(SegmentKey segmentKey)
segmentKey to segmentKey.segmentKey - The value for segmentKeythis builder for chained invocationpublic final MediaSegment.Builder segmentKey(java.util.Optional<? extends SegmentKey> segmentKey)
segmentKey to segmentKey.segmentKey - The value for segmentKeythis builder for use in a chained invocationpublic final MediaSegment.Builder discontinuity(boolean discontinuity)
discontinuity attribute.
If not set, this attribute will have a default value as returned by the initializer of discontinuity.
discontinuity - The value for discontinuitythis builder for use in a chained invocationpublic MediaSegment build()
MediaSegment.java.lang.IllegalStateException - if any required attributes are missing