public class NoUidTimeline extends ForwardingTimeline
Timeline.Period, Timeline.Window
timeline
Constructor | Description |
---|---|
NoUidTimeline(Timeline timeline) |
Creates an instance.
|
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. |
getFirstWindowIndex, getIndexOfPeriod, getLastWindowIndex, getNextWindowIndex, getPeriodCount, getPreviousWindowIndex, getUidOfPeriod, getWindowCount
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
equals, getNextPeriodIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getWindow, getWindow, hashCode, isEmpty, isLastPeriod
public NoUidTimeline(Timeline timeline)
timeline
- The underlying timeline.public Timeline.Window getWindow(int windowIndex, Timeline.Window window, long defaultPositionProjectionUs)
Timeline
Timeline.Window
with data for the window at the specified index.getWindow
in class ForwardingTimeline
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.Timeline.Window
, for convenience.public Timeline.Period getPeriod(int periodIndex, Timeline.Period period, boolean setIds)
Timeline
Timeline.Period
with data for the period at the specified index.getPeriod
in class ForwardingTimeline
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.Timeline.Period
, for convenience.