Package com.google.android.exoplayer2.offline

## Class SegmentDownloader.Segment

- java.lang.Object
- - com.google.android.exoplayer2.offline.SegmentDownloader.Segment

- All Implemented Interfaces:
    `Comparable<SegmentDownloader.Segment>`
  Enclosing class:
    SegmentDownloader<M extends FilterableManifest<M>>

      protected static class SegmentDownloader.Segment
      extends Object
      implements Comparable<SegmentDownloader.Segment>

  Smallest unit of content to be downloaded.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `DataSpec` | `dataSpec` | The `DataSpec` of the segment.
    `long` | `startTimeUs` | The start time of the segment in microseconds.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Segment​(long startTimeUs, DataSpec dataSpec)` | Constructs a Segment.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compareTo​(SegmentDownloader.Segment other)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### startTimeUs

          public final long startTimeUs

      The start time of the segment in microseconds.

    - #### dataSpec

          public final DataSpec dataSpec

      The `DataSpec` of the segment.

  - ### Constructor Detail

    - #### Segment

          public Segment​(long startTimeUs,
                         DataSpec dataSpec)

      Constructs a Segment.

  - ### Method Detail

    - #### compareTo

          public int compareTo​(SegmentDownloader.Segment other)

      Specified by:
        `compareTo` in interface `Comparable<SegmentDownloader.Segment>`