Package com.google.android.exoplayer2.testutil

## Class NoUidTimeline

- java.lang.Object
- - com.google.android.exoplayer2.Timeline
  - - com.google.android.exoplayer2.source.ForwardingTimeline
    - - com.google.android.exoplayer2.testutil.NoUidTimeline

- All Implemented Interfaces:
    `Bundleable`

      public class NoUidTimeline
      extends ForwardingTimeline

  A timeline which wraps another timeline and overrides all window and period uids to 0. This is useful for testing timeline equality without taking uids into account.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.google.android.exoplayer2.Timeline

      `Timeline.Period, Timeline.RemotableTimeline, Timeline.Window`

    - ### Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable

      `Bundleable.Creator<T extends Bundleable>`

  - ### Field Summary

    - ### Fields inherited from class com.google.android.exoplayer2.source.ForwardingTimeline

      `timeline`

    - ### Fields inherited from class com.google.android.exoplayer2.Timeline

      `CREATOR, EMPTY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `NoUidTimeline​(Timeline timeline)` | Creates an instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Timeline.Period` | `getPeriod​(int periodIndex, Timeline.Period period, boolean setIds)` | Populates a `Timeline.Period` with data for the period at the specified index.
    `Timeline.Window` | `getWindow​(int windowIndex, Timeline.Window window, long defaultPositionProjectionUs)` | Populates a `Timeline.Window` with data for the window at the specified index.

    - ### Methods inherited from class com.google.android.exoplayer2.source.ForwardingTimeline

      `getFirstWindowIndex, getIndexOfPeriod, getLastWindowIndex, getNextWindowIndex, getPeriodCount, getPreviousWindowIndex, getUidOfPeriod, getWindowCount`

    - ### Methods inherited from class com.google.android.exoplayer2.Timeline

      `equals, getNextPeriodIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getWindow, hashCode, isEmpty, isLastPeriod, toBundle, toBundle`

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

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

- - ### Constructor Detail

    - #### NoUidTimeline

          public NoUidTimeline​(Timeline timeline)

      Creates an instance.
      Parameters:
        `timeline` - The underlying timeline.

  - ### Method Detail

    - #### getWindow

          public Timeline.Window getWindow​(int windowIndex,
                                           Timeline.Window window,
                                           long defaultPositionProjectionUs)

      Description copied from class: `Timeline`
      Populates a `Timeline.Window` with data for the window at the specified index.
      Overrides:
        `getWindow` in class `ForwardingTimeline`
      Parameters:
        `windowIndex` - The index of the window.
        `window` - The `Timeline.Window` to populate. Must not be null.
        `defaultPositionProjectionUs` - A duration into the future that the populated window's default start position should be projected.
      Returns:
        The populated `Timeline.Window`, for convenience.

    - #### getPeriod

          public Timeline.Period getPeriod​(int periodIndex,
                                           Timeline.Period period,
                                           boolean setIds)

      Description copied from class: `Timeline`
      Populates a `Timeline.Period` with data for the period at the specified index.
      Overrides:
        `getPeriod` in class `ForwardingTimeline`
      Parameters:
        `periodIndex` - The index of the period.
        `period` - The `Timeline.Period` to populate. Must not be null.
        `setIds` - Whether `Timeline.Period.id` and `Timeline.Period.uid` should be populated. If false, the fields will be set to null. The caller should pass false for efficiency reasons unless the fields are required.
      Returns:
        The populated `Timeline.Period`, for convenience.