Class Timeline
- java.lang.Object
-
- com.castlabs.android.player.models.Timeline
-
public class Timeline extends Object
Timeline object.Composed of
Timeline.Windows andTimeline.Periods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTimeline.Builderstatic classTimeline.PeriodA Period.static classTimeline.WindowA Window.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Timeline.PeriodgetPeriod(int index)Returns the requested PeriodintgetPeriodCount()Returns the number of Period in the TimelineList<Timeline.Period>getPeriods()Returns the List ofTimeline.PeriodsTimeline.WindowgetWindow(int index)Returns the requested WindowintgetWindowCount()Returns the number of Window in the TimelineList<Timeline.Window>getWindows()Returns the List ofTimeline.PeriodsbooleanisEmpty()
-
-
-
Field Detail
-
EMPTY
public static final Timeline EMPTY
-
-
Method Detail
-
getPeriodCount
public int getPeriodCount()
Returns the number of Period in the Timeline- Returns:
- the number of Period
-
getWindowCount
public int getWindowCount()
Returns the number of Window in the Timeline- Returns:
- the number of Window
-
getPeriod
@Nullable public Timeline.Period getPeriod(int index)
Returns the requested Period- Parameters:
index- the index of the Period to return- Returns:
- the Period, or null if out of bounds
-
getWindow
@Nullable public Timeline.Window getWindow(int index)
Returns the requested Window- Parameters:
index- the index of the Window to return- Returns:
- the Window, or null if out of bounds
-
getPeriods
@NonNull public List<Timeline.Period> getPeriods()
Returns the List ofTimeline.Periods- Returns:
- the List of
Timeline.Periods
-
getWindows
@NonNull public List<Timeline.Window> getWindows()
Returns the List ofTimeline.Periods- Returns:
- the List of
Timeline.Periods
-
isEmpty
public boolean isEmpty()
- Returns:
- whether the Timeline is empty.
-
-