Class Timeline
- java.lang.Object
-
- com.castlabs.android.player.models.Timeline
-
public class Timeline extends Object
Timeline object.Composed of
Timeline.Window
s andTimeline.Period
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Timeline.Builder
static class
Timeline.Period
A Period.static class
Timeline.Window
A Window.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Timeline.Period
getPeriod(int index)
Returns the requested Periodint
getPeriodCount()
Returns the number of Period in the TimelineList<Timeline.Period>
getPeriods()
Returns the List ofTimeline.Period
sTimeline.Window
getWindow(int index)
Returns the requested Windowint
getWindowCount()
Returns the number of Window in the TimelineList<Timeline.Window>
getWindows()
Returns the List ofTimeline.Period
sboolean
isEmpty()
-
-
-
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.Period
s- Returns:
- the List of
Timeline.Period
s
-
getWindows
@NonNull public List<Timeline.Window> getWindows()
Returns the List ofTimeline.Period
s- Returns:
- the List of
Timeline.Period
s
-
isEmpty
public boolean isEmpty()
- Returns:
- whether the Timeline is empty.
-
-